summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/databases/postgres.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2007-08-09 19:51:36 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2007-08-09 19:51:36 +0000
commitb0253eb9b5eca87fde3f9341e403985e1dcf74c4 (patch)
tree8ff8d3a37b8c2adc084099fcca0008d6cc7db5b9 /lib/sqlalchemy/databases/postgres.py
parentbdd780dd88950106df09f81e539067f3bd98a06c (diff)
downloadsqlalchemy-b0253eb9b5eca87fde3f9341e403985e1dcf74c4.tar.gz
- 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
Diffstat (limited to 'lib/sqlalchemy/databases/postgres.py')
-rw-r--r--lib/sqlalchemy/databases/postgres.py4
1 files changed, 3 insertions, 1 deletions
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))