From fd6c2c0c21208dab1ae85c3722f2f454b7bb4db7 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sat, 3 Jun 2006 17:48:55 +0000 Subject: dbengine doc: no support for pg1 postgres: if module is none, still use pyformat for some unit tests --- lib/sqlalchemy/databases/postgres.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/sqlalchemy/databases/postgres.py b/lib/sqlalchemy/databases/postgres.py index b6917c035..50d67ad56 100644 --- a/lib/sqlalchemy/databases/postgres.py +++ b/lib/sqlalchemy/databases/postgres.py @@ -30,7 +30,6 @@ except: except: psycopg = None - class PGNumeric(sqltypes.Numeric): def get_col_spec(self): return "NUMERIC(%(precision)s, %(length)s)" % {'precision': self.precision, 'length' : self.length} @@ -215,7 +214,10 @@ class PGDialect(ansisql.ANSIDialect): except: self.version = 1 ansisql.ANSIDialect.__init__(self, **params) - + # produce consistent paramstyle even if psycopg2 module not present + if self.module is None: + self.paramstyle = 'pyformat' + def create_connect_args(self, url): opts = url.translate_connect_args(['host', 'database', 'user', 'password', 'port']) if opts.has_key('port'): -- cgit v1.2.1