From: Mike Bayer Date: Sun, 23 Jun 2013 04:21:22 +0000 (-0400) Subject: 2.5ism X-Git-Tag: rel_0_8_2~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=564c4eac715dfe9f18232a65ac74115493a89d2e;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git 2.5ism --- diff --git a/lib/sqlalchemy/dialects/postgresql/constraints.py b/lib/sqlalchemy/dialects/postgresql/constraints.py index 5b8bbe6430..c6ccff0bdb 100644 --- a/lib/sqlalchemy/dialects/postgresql/constraints.py +++ b/lib/sqlalchemy/dialects/postgresql/constraints.py @@ -39,7 +39,7 @@ class ExcludeConstraint(ColumnCollectionConstraint): :param using: Optional string. If set, emit USING when issuing DDL for this constraint. Defaults to 'gist'. - + :param where: Optional string. If set, emit WHERE when issuing DDL for this constraint. @@ -47,10 +47,10 @@ class ExcludeConstraint(ColumnCollectionConstraint): """ ColumnCollectionConstraint.__init__( self, - *[col for col, op in elements], name=kw.get('name'), deferrable=kw.get('deferrable'), - initially=kw.get('initially') + initially=kw.get('initially'), + *[col for col, op in elements] ) self.operators = {} for col_or_string, op in elements: @@ -60,14 +60,14 @@ class ExcludeConstraint(ColumnCollectionConstraint): where = kw.get('where') if where: self.where = expression._literal_as_text(where) - + def copy(self, **kw): elements = [(col, self.operators[col]) for col in self.columns.keys()] - c = self.__class__(*elements, - name=self.name, + c = self.__class__(name=self.name, deferrable=self.deferrable, - initially=self.initially) + initially=self.initially, + *elements) c.dispatch._update(self.dispatch) return c