From b0253eb9b5eca87fde3f9341e403985e1dcf74c4 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Thu, 9 Aug 2007 19:51:36 +0000 Subject: - added 'object_session' as classlevel method to Session - moved 'identity_key' to be a classmethod on Session - some docstrings - merged r3229 from 0.3 branch to unconditonally quote schemaname in PG-reflected default - name fixes in dynamic unit test --- lib/sqlalchemy/databases/postgres.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/sqlalchemy/databases') diff --git a/lib/sqlalchemy/databases/postgres.py b/lib/sqlalchemy/databases/postgres.py index d3467105b..8f04eca26 100644 --- a/lib/sqlalchemy/databases/postgres.py +++ b/lib/sqlalchemy/databases/postgres.py @@ -447,7 +447,9 @@ class PGDialect(ansisql.ANSIDialect): # the default is related to a Sequence sch = table.schema if '.' not in match.group(2) and sch is not None: - default = match.group(1) + sch + '.' + match.group(2) + match.group(3) + # unconditionally quote the schema name. this could + # later be enhanced to obey quoting rules / "quote schema" + default = match.group(1) + ('"%s"' % sch) + '.' + match.group(2) + match.group(3) colargs.append(schema.PassiveDefault(sql.text(default))) table.append_column(schema.Column(name, coltype, nullable=nullable, *colargs)) -- cgit v1.2.1