summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/postgresql/base.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2018-08-22 17:18:48 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2018-08-22 17:19:45 -0400
commit469931514a1517dde82ba56f780c3007c66d5943 (patch)
tree436a4138904e98f7a7dfb1297b582357784af1fa /lib/sqlalchemy/dialects/postgresql/base.py
parent52a3f5b7635583ae6feb084b1db654b9c65caec2 (diff)
downloadsqlalchemy-469931514a1517dde82ba56f780c3007c66d5943.tar.gz
Propagate **kw in postgresql distinct on compilation
Fixed bug in PostgreSQL dialect where compiler keyword arguments such as ``literal_binds=True`` were not being propagated to a DISTINCT ON expression. Fixes: #4325 Change-Id: I9949387dceb7fabe889799f42e92423572368b29
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/base.py')
-rw-r--r--lib/sqlalchemy/dialects/postgresql/base.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py
index 7db26e4c0..ea2c51870 100644
--- a/lib/sqlalchemy/dialects/postgresql/base.py
+++ b/lib/sqlalchemy/dialects/postgresql/base.py
@@ -1525,7 +1525,7 @@ class PGCompiler(compiler.SQLCompiler):
return "DISTINCT "
elif isinstance(select._distinct, (list, tuple)):
return "DISTINCT ON (" + ', '.join(
- [self.process(col) for col in select._distinct]
+ [self.process(col, **kw) for col in select._distinct]
) + ") "
else:
return "DISTINCT ON (" + \