summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/postgresql/ext.py
diff options
context:
space:
mode:
authorFederico Caselli <cfederico87@gmail.com>2023-02-22 21:57:19 +0100
committerFederico Caselli <cfederico87@gmail.com>2023-02-22 21:57:19 +0100
commit71693c94d52612a5e88128575ff308ee4a923c00 (patch)
tree40a75810ea3c857e3bd7bef056e5cf948f61f3a4 /lib/sqlalchemy/dialects/postgresql/ext.py
parentfc57bafbae9d67b7ce95e26c939ca957c366b0f7 (diff)
downloadsqlalchemy-71693c94d52612a5e88128575ff308ee4a923c00.tar.gz
ExcludeConstraint literal_compile
ExcludeConstraint correctly uses literal compile when compiling expression ddl. Fixes: #9349 Change-Id: I11a994ac46556a972afc696a2baad7ddbdd3de97
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/ext.py')
-rw-r--r--lib/sqlalchemy/dialects/postgresql/ext.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/ext.py b/lib/sqlalchemy/dialects/postgresql/ext.py
index 0f5efb1de..22604955d 100644
--- a/lib/sqlalchemy/dialects/postgresql/ext.py
+++ b/lib/sqlalchemy/dialects/postgresql/ext.py
@@ -164,16 +164,15 @@ class ExcludeConstraint(ColumnCollectionConstraint):
:param \*elements:
A sequence of two tuples of the form ``(column, operator)`` where
- "column" is a SQL expression element or a raw SQL string, most
- typically a :class:`_schema.Column` object,
- and "operator" is a string
- containing the operator to use. In order to specify a column name
- when a :class:`_schema.Column` object is not available,
- while ensuring
+ "column" is a SQL expression element or the name of a column as
+ string, most typically a :class:`_schema.Column` object,
+ and "operator" is a string containing the operator to use.
+ In order to specify a column name when a :class:`_schema.Column`
+ object is not available, while ensuring
that any necessary quoting rules take effect, an ad-hoc
:class:`_schema.Column` or :func:`_expression.column`
- object should be
- used.
+ object should be used. ``column`` may also be a string SQL
+ expression when passed as :func:`_expression.literal_column`
:param name:
Optional, the in-database name of this constraint.