summaryrefslogtreecommitdiff
path: root/test/dialect/postgresql/test_compiler.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2015-06-19 13:45:01 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2015-06-19 13:45:01 -0400
commit99ceed3e55e87c7aca9898359e68c90ecee7965c (patch)
tree3b8b0ff56e8c3305f4974bb52e88c8cc64a462de /test/dialect/postgresql/test_compiler.py
parenta1b6e9f324eec04ff69f2ac5347ad3df5b931dd5 (diff)
parentaf19435b9c1cec28d0ac93aa832b45601af51597 (diff)
downloadsqlalchemy-99ceed3e55e87c7aca9898359e68c90ecee7965c.tar.gz
Merge remote-tracking branch 'origin/pr/179' into pr179
Diffstat (limited to 'test/dialect/postgresql/test_compiler.py')
-rw-r--r--test/dialect/postgresql/test_compiler.py24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/dialect/postgresql/test_compiler.py b/test/dialect/postgresql/test_compiler.py
index d5c8d9065..731141604 100644
--- a/test/dialect/postgresql/test_compiler.py
+++ b/test/dialect/postgresql/test_compiler.py
@@ -370,6 +370,30 @@ class CompileTest(fixtures.TestBase, AssertsCompiledSQL):
'USING hash (data)',
dialect=postgresql.dialect())
+ def test_create_index_with_with(self):
+ m = MetaData()
+ tbl = Table('testtbl', m, Column('data', String))
+
+ idx1 = Index('test_idx1', tbl.c.data)
+ idx2 = Index('test_idx2', tbl.c.data, postgresql_with={"fillfactor": 50})
+ idx3 = Index('test_idx3', tbl.c.data, postgresql_using="gist",
+ postgresql_with={"buffering": "off"})
+
+ self.assert_compile(schema.CreateIndex(idx1),
+ 'CREATE INDEX test_idx1 ON testtbl '
+ '(data)',
+ dialect=postgresql.dialect())
+ self.assert_compile(schema.CreateIndex(idx2),
+ 'CREATE INDEX test_idx2 ON testtbl '
+ '(data) '
+ 'WITH (fillfactor = 50)',
+ dialect=postgresql.dialect())
+ self.assert_compile(schema.CreateIndex(idx3),
+ 'CREATE INDEX test_idx3 ON testtbl '
+ 'USING gist (data) '
+ 'WITH (buffering = off)',
+ dialect=postgresql.dialect())
+
def test_create_index_expr_gets_parens(self):
m = MetaData()
tbl = Table('testtbl', m, Column('x', Integer), Column('y', Integer))