From 64a97cd040782dfacec785aa2e721d8ac633dd13 Mon Sep 17 00:00:00 2001 From: Massimo Di Pierro Date: Sun, 22 Jan 2012 16:09:23 -0600 Subject: [PATCH] postgresql string concatenation --- VERSION | 2 +- gluon/dal.py | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index ad5f7731..b6093104 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 1.99.4 (2012-01-21 17:32:51) stable +Version 1.99.4 (2012-01-22 16:08:57) stable diff --git a/gluon/dal.py b/gluon/dal.py index 3445d3b7..a0ddefa6 100644 --- a/gluon/dal.py +++ b/gluon/dal.py @@ -1901,6 +1901,13 @@ class PostgreSQLAdapter(BaseAdapter): def RANDOM(self): return 'RANDOM()' + def ADD(self, first, second): + t = first.type + if t in ('text','string','password','upload','blob'): + return '(%s || %s)' % (self.expand(first), self.expand(second, t)) + else: + return '(%s + %s)' % (self.expand(first), self.expand(second, t)) + def distributed_transaction_begin(self,key): return