From 1c578a710f14568856dad6a1c0bad1269b4108c4 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Mon, 30 Jan 2017 12:10:16 -0500 Subject: Copy whereclause / using in ExcludeConstraint Fixed bug in Postgresql :class:`.ExcludeConstraint` where the "whereclause" and "using" parameters would not be copied during an operation like :meth:`.Table.tometadata`. Change-Id: I2f704981d4d4862f9c82a50272006fab8becebb6 Fixes: #3900 --- lib/sqlalchemy/dialects/postgresql/ext.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/sqlalchemy/dialects/postgresql/ext.py') diff --git a/lib/sqlalchemy/dialects/postgresql/ext.py b/lib/sqlalchemy/dialects/postgresql/ext.py index e3ac79f30..55eded90a 100644 --- a/lib/sqlalchemy/dialects/postgresql/ext.py +++ b/lib/sqlalchemy/dialects/postgresql/ext.py @@ -199,7 +199,9 @@ static/sql-createtable.html#SQL-CREATETABLE-EXCLUDE c = self.__class__(*elements, name=self.name, deferrable=self.deferrable, - initially=self.initially) + initially=self.initially, + where=self.where, + using=self.using) c.dispatch._update(self.dispatch) return c -- cgit v1.2.1