Commits

Mike Bayer committed c332606

fix to string concatenation operator courtesy Marko Mikulicic

Comments (0)

Files changed (1)

lib/sqlalchemy/databases/postgres.py

                 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):