diff options
Diffstat (limited to 'test/dialect/postgresql/test_compiler.py')
-rw-r--r-- | test/dialect/postgresql/test_compiler.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/dialect/postgresql/test_compiler.py b/test/dialect/postgresql/test_compiler.py index b3a0b9bbd..ec165960f 100644 --- a/test/dialect/postgresql/test_compiler.py +++ b/test/dialect/postgresql/test_compiler.py @@ -1778,6 +1778,25 @@ class CompileTest(fixtures.TestBase, AssertsCompiledSQL): "(INCREMENT BY 7 START WITH 4))", ) + def test_column_identity_null(self): + # all other tests are in test_identity_column.py + m = MetaData() + t = Table( + "t", + m, + Column( + "y", + Integer, + Identity(always=True, start=4, increment=7), + nullable=True, + ), + ) + self.assert_compile( + schema.CreateTable(t), + "CREATE TABLE t (y INTEGER GENERATED ALWAYS AS IDENTITY " + "(INCREMENT BY 7 START WITH 4) NULL)", + ) + def test_index_extra_include_1(self): metadata = MetaData() tbl = Table( |