diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-06-20 17:58:06 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-06-20 17:58:06 -0400 |
| commit | 42bbb7163adaaa1513c7c4f5212675632be8e030 (patch) | |
| tree | 8f67d356363be1ff9f8fb01cf8995c57ca060c60 /test/dialect | |
| parent | a46932422b9bc7422e86b7d7db9fb753136730e0 (diff) | |
| download | sqlalchemy-42bbb7163adaaa1513c7c4f5212675632be8e030.tar.gz | |
- Added a new type :class:`.postgresql.OID` to the Postgresql dialect.
While "oid" is generally a private type within PG that is not exposed
in modern versions, there are some PG use cases such as large object
support where these types might be exposed, as well as within some
user-reported schema reflection use cases.
fixes #3002
Diffstat (limited to 'test/dialect')
| -rw-r--r-- | test/dialect/postgresql/test_types.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/dialect/postgresql/test_types.py b/test/dialect/postgresql/test_types.py index 1bfa8c4b7..d70a0a52f 100644 --- a/test/dialect/postgresql/test_types.py +++ b/test/dialect/postgresql/test_types.py @@ -320,6 +320,19 @@ class EnumTest(fixtures.TestBase, AssertsExecutionResults): finally: metadata.drop_all() +class OIDTest(fixtures.TestBase): + __only_on__ = 'postgresql' + + @testing.provide_metadata + def test_reflection(self): + metadata = self.metadata + Table('table', metadata, Column('x', Integer), + Column('y', postgresql.OID)) + metadata.create_all() + m2 = MetaData() + t2 = Table('table', m2, autoload_with=testing.db, autoload=True) + assert isinstance(t2.c.y.type, postgresql.OID) + class NumericInterpretationTest(fixtures.TestBase): __only_on__ = 'postgresql' |
