summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/dialects/postgresql/base.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql/base.py')
-rw-r--r--lib/sqlalchemy/dialects/postgresql/base.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py
index c1c0ab08e..73fe5022a 100644
--- a/lib/sqlalchemy/dialects/postgresql/base.py
+++ b/lib/sqlalchemy/dialects/postgresql/base.py
@@ -1446,7 +1446,7 @@ class PGCompiler(compiler.SQLCompiler):
raise exc.CompileError("Unrecognized hint: %r" % hint)
return "ONLY " + sqltext
- def get_select_precolumns(self, select):
+ def get_select_precolumns(self, select, **kw):
if select._distinct is not False:
if select._distinct is True:
return "DISTINCT "
@@ -1455,7 +1455,8 @@ class PGCompiler(compiler.SQLCompiler):
[self.process(col) for col in select._distinct]
) + ") "
else:
- return "DISTINCT ON (" + self.process(select._distinct) + ") "
+ return "DISTINCT ON (" + \
+ self.process(select._distinct, **kw) + ") "
else:
return ""