From d0e14d7b30d5a1a8a14f9ee7c36fd91ebfd94660 Mon Sep 17 00:00:00 2001 From: ced <> Date: Tue, 12 Dec 2006 14:45:46 +0000 Subject: [PATCH] Fix lower case for fields bzr revid: ced-729764c3060bdd8096ef4b3c6bb665fa30a0ecd4 --- bin/osv/orm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/osv/orm.py b/bin/osv/orm.py index 3568315b6f0..bb015bfd674 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -339,7 +339,7 @@ class orm(object): cr.execute("CREATE INDEX %s_%s_index ON %s (%s)" % (f._rel,f._id2,f._rel,f._id2)) cr.commit() else: - q = """SELECT c.relname,a.attname,a.attlen,a.atttypmod,a.attnotnull,a.atthasdef,t.typname,CASE WHEN a.attlen=-1 THEN a.atttypmod-4 ELSE a.attlen END as size FROM pg_class c,pg_attribute a,pg_type t WHERE c.relname='%s' AND a.attname='%s' AND c.oid=a.attrelid AND a.atttypid=t.oid""" % (self._table, k) + q = """SELECT c.relname,a.attname,a.attlen,a.atttypmod,a.attnotnull,a.atthasdef,t.typname,CASE WHEN a.attlen=-1 THEN a.atttypmod-4 ELSE a.attlen END as size FROM pg_class c,pg_attribute a,pg_type t WHERE c.relname='%s' AND a.attname='%s' AND c.oid=a.attrelid AND a.atttypid=t.oid""" % (self._table, k.lower()) cr.execute(q) res = cr.dictfetchall() if not res: