summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/databases/postgres.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2006-02-14 00:28:52 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2006-02-14 00:28:52 +0000
commit1316909da1d10b9b99fc60874c82be0371daf15e (patch)
tree40b42df972328f7bd88e6ba120e307b7524be353 /lib/sqlalchemy/databases/postgres.py
parentfa0d6246c3a73d93e0dd59601c38bbe8f8ce6bfa (diff)
downloadsqlalchemy-1316909da1d10b9b99fc60874c82be0371daf15e.tar.gz
fix to string concatenation operator courtesy Marko Mikulicic
Diffstat (limited to 'lib/sqlalchemy/databases/postgres.py')
-rw-r--r--lib/sqlalchemy/databases/postgres.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/sqlalchemy/databases/postgres.py b/lib/sqlalchemy/databases/postgres.py
index 9a6374842..dab14b460 100644
--- a/lib/sqlalchemy/databases/postgres.py
+++ b/lib/sqlalchemy/databases/postgres.py
@@ -277,6 +277,12 @@ class PGCompiler(ansisql.ANSICompiler):
text += " \n LIMIT ALL"
text += " OFFSET " + str(select.offset)
return text
+
+ def binary_operator_string(self, binary):
+ if isinstance(binary.type, sqltypes.String) and binary.operator == '+':
+ return '||'
+ else:
+ return ansisql.ANSICompiler.binary_operator_string(self, binary)
class PGSchemaGenerator(ansisql.ANSISchemaGenerator):