summaryrefslogtreecommitdiff
path: root/test/dialect/postgresql/test_compiler.py
diff options
context:
space:
mode:
authorMalik Diarra <malik.diarra@gmail.com>2014-08-17 01:39:14 +0200
committerMalik Diarra <malik.diarra@gmail.com>2014-08-17 01:56:02 +0200
commit8e03430acdb98d7e5fef4a48a3120b928ed3266d (patch)
treef40d1552cb8d72f7bf858937b4d3e1450a762e6c /test/dialect/postgresql/test_compiler.py
parentd6873904c40134df787ffe5459d61d3663bf5d5f (diff)
downloadsqlalchemy-8e03430acdb98d7e5fef4a48a3120b928ed3266d.tar.gz
quoting tablespace name in create table command in postgresql dialect
Diffstat (limited to 'test/dialect/postgresql/test_compiler.py')
-rw-r--r--test/dialect/postgresql/test_compiler.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/dialect/postgresql/test_compiler.py b/test/dialect/postgresql/test_compiler.py
index b439ab916..e4a8c02eb 100644
--- a/test/dialect/postgresql/test_compiler.py
+++ b/test/dialect/postgresql/test_compiler.py
@@ -172,6 +172,11 @@ class CompileTest(fixtures.TestBase, AssertsCompiledSQL):
self.assert_compile(schema.CreateTable(tbl),
"CREATE TABLE atable (id INTEGER)TABLESPACE sometablespace")
+ # testing quoting of tablespace name
+ tbl = Table('anothertable', m, Column("id", Integer), postgresql_tablespace = 'table')
+ self.assert_compile(schema.CreateTable(tbl),
+ 'CREATE TABLE anothertable (id INTEGER)TABLESPACE "table"')
+
def test_create_table_with_oids(self):
m = MetaData()
tbl = Table('atable', m, Column("id", Integer), postgresql_withoids = True, )