diff options
| author | Philip Jenvey <pjenvey@underboss.org> | 2009-09-24 02:11:56 +0000 |
|---|---|---|
| committer | Philip Jenvey <pjenvey@underboss.org> | 2009-09-24 02:11:56 +0000 |
| commit | 5a9c1b8824bb84aaf8baccdfa2780a94af5c0f44 (patch) | |
| tree | abb0eed7f59567b73b0087d2f1e68c89254f7d2a /lib/sqlalchemy/dialects/postgresql | |
| parent | 79ce8e89bd0537d26c8c3594557b2aa4c67f8f90 (diff) | |
| download | sqlalchemy-5a9c1b8824bb84aaf8baccdfa2780a94af5c0f44.tar.gz | |
merge from branches/clauseelement-nonzero
adds a __nonzero__ to _BinaryExpression to avoid faulty comparisons during hash
collisions (which only occur on Jython)
fixes #1547
Diffstat (limited to 'lib/sqlalchemy/dialects/postgresql')
| -rw-r--r-- | lib/sqlalchemy/dialects/postgresql/base.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py index a6fa21f99..78ea1a8fc 100644 --- a/lib/sqlalchemy/dialects/postgresql/base.py +++ b/lib/sqlalchemy/dialects/postgresql/base.py @@ -240,8 +240,8 @@ class PGCompiler(compiler.SQLCompiler): return text def get_select_precolumns(self, select): - if select._distinct: - if isinstance(select._distinct, bool): + if select._distinct is not False: + if select._distinct is True: return "DISTINCT " elif isinstance(select._distinct, (list, tuple)): return "DISTINCT ON (" + ', '.join( |
