From: Mike Bayer Date: Tue, 14 Feb 2006 00:28:52 +0000 (+0000) Subject: fix to string concatenation operator courtesy Marko Mikulicic X-Git-Tag: rel_0_1_0~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1316909da1d10b9b99fc60874c82be0371daf15e;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git fix to string concatenation operator courtesy Marko Mikulicic --- diff --git a/lib/sqlalchemy/databases/postgres.py b/lib/sqlalchemy/databases/postgres.py index 9a63748429..dab14b460d 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):