summaryrefslogtreecommitdiff
path: root/test/dialect/test_postgresql.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/dialect/test_postgresql.py')
-rw-r--r--test/dialect/test_postgresql.py20
1 files changed, 19 insertions, 1 deletions
diff --git a/test/dialect/test_postgresql.py b/test/dialect/test_postgresql.py
index f8ca65e60..9aa281979 100644
--- a/test/dialect/test_postgresql.py
+++ b/test/dialect/test_postgresql.py
@@ -17,7 +17,7 @@ import logging
class SequenceTest(TestBase, AssertsCompiledSQL):
- def test_basic(self):
+ def test_format(self):
seq = Sequence('my_seq_no_schema')
dialect = postgresql.PGDialect()
assert dialect.identifier_preparer.format_sequence(seq) \
@@ -29,6 +29,24 @@ class SequenceTest(TestBase, AssertsCompiledSQL):
assert dialect.identifier_preparer.format_sequence(seq) \
== '"Some_Schema"."My_Seq"'
+ @testing.only_on('postgresql', 'foo')
+ @testing.provide_metadata
+ def test_reverse_eng_name(self):
+ engine = engines.testing_engine(options=dict(implicit_returning=False))
+ for tname, cname in [
+ ('tb1' * 30, 'abc'),
+ ('tb2', 'abc' * 30),
+ ('tb3' * 30, 'abc' * 30),
+ ('tb4', 'abc'),
+ ]:
+ t = Table(tname[:57],
+ metadata,
+ Column(cname[:57], Integer, primary_key=True)
+ )
+ t.create(engine)
+ r = engine.execute(t.insert())
+ assert r.inserted_primary_key == [1]
+
class CompileTest(TestBase, AssertsCompiledSQL):
__dialect__ = postgresql.dialect()