From: Mike Bayer Date: Mon, 30 Oct 2006 18:19:34 +0000 (+0000) Subject: - fix to postgres sequence quoting when using schemas X-Git-Tag: rel_0_3_1~28 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b2c68fab83092eb760e07c63c64274bf59f46f54;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git - fix to postgres sequence quoting when using schemas --- diff --git a/CHANGES b/CHANGES index 9b17f1648a..acddae34f6 100644 --- a/CHANGES +++ b/CHANGES @@ -7,6 +7,7 @@ loaded already. this can be turned off (i.e. the old behavior) by setting passive_deletes=True on a relation(). - MySQL catches exception on "describe" and reports as NoSuchTableError - further fixes to sqlite booleans, weren't working as defaults +- fix to postgres sequence quoting when using schemas 0.3.0 - General: diff --git a/lib/sqlalchemy/databases/postgres.py b/lib/sqlalchemy/databases/postgres.py index bcbe5f6702..5c78e2f520 100644 --- a/lib/sqlalchemy/databases/postgres.py +++ b/lib/sqlalchemy/databases/postgres.py @@ -530,7 +530,7 @@ class PGDefaultRunner(ansisql.ANSIDefaultRunner): # TODO: this has to build into the Sequence object so we can get the quoting # logic from it if sch is not None: - exc = "select nextval('\"%s.%s_%s_seq\"')" % (sch, column.table.name, column.name) + exc = "select nextval('\"%s\".\"%s_%s_seq\"')" % (sch, column.table.name, column.name) else: exc = "select nextval('\"%s_%s_seq\"')" % (column.table.name, column.name) c = self.proxy(exc)