diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-03-25 12:26:42 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2014-03-25 12:27:03 -0400 |
commit | f6614aed6604d28387fc118ae70b20a2b058f571 (patch) | |
tree | d1c26d8f6035b15c7ccc0836cf1074a8732715f7 | |
parent | d8aa3d91d7ead47dc4b38ab34a40ea81d59dbe9b (diff) | |
download | sqlalchemy-f6614aed6604d28387fc118ae70b20a2b058f571.tar.gz |
- Fixed regression caused by release 0.8.5 / 0.9.3's compatibility
enhancements where index reflection on Postgresql versions specific
to only the 8.1, 8.2 series again
broke, surrounding the ever problematic int2vector type. While
int2vector supports array operations as of 8.1, apparently it only
supports CAST to a varchar as of 8.3.
fix #3000
-rw-r--r-- | doc/build/changelog/changelog_08.rst | 12 | ||||
-rw-r--r-- | lib/sqlalchemy/dialects/postgresql/base.py | 5 | ||||
-rw-r--r-- | test/dialect/postgresql/test_reflection.py | 2 |
3 files changed, 17 insertions, 2 deletions
diff --git a/doc/build/changelog/changelog_08.rst b/doc/build/changelog/changelog_08.rst index 79295f960..f8f423295 100644 --- a/doc/build/changelog/changelog_08.rst +++ b/doc/build/changelog/changelog_08.rst @@ -12,6 +12,18 @@ :version: 0.8.6 .. change:: + :tags: bug, postgresql + :tickets: 3000 + :versions: 0.9.4 + + Fixed regression caused by release 0.8.5 / 0.9.3's compatibility + enhancements where index reflection on Postgresql versions specific + to only the 8.1, 8.2 series again + broke, surrounding the ever problematic int2vector type. While + int2vector supports array operations as of 8.1, apparently it only + supports CAST to a varchar as of 8.3. + + .. change:: :tags: bug, orm :tickets: 2995, :versions: 0.9.4 diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py index c15e43417..2e2396b4d 100644 --- a/lib/sqlalchemy/dialects/postgresql/base.py +++ b/lib/sqlalchemy/dialects/postgresql/base.py @@ -1968,7 +1968,10 @@ class PGDialect(default.DefaultDialect): t.relname, i.relname """ % ( - "::varchar" if self.server_version_info >= (8, 1) else "", + # version 8.3 here was based on observing the + # cast does not work in PG 8.2.4, does work in 8.3.0. + # nothing in PG changelogs regarding this. + "::varchar" if self.server_version_info >= (8, 3) else "", self._pg_index_any("a.attnum", "ix.indkey") ) diff --git a/test/dialect/postgresql/test_reflection.py b/test/dialect/postgresql/test_reflection.py index ea8a1a5e8..6c0f3ba20 100644 --- a/test/dialect/postgresql/test_reflection.py +++ b/test/dialect/postgresql/test_reflection.py @@ -19,7 +19,7 @@ class DomainReflectionTest(fixtures.TestBase, AssertsExecutionResults): """Test PostgreSQL domains""" - __only_on__ = 'postgresql > 8.2' + __only_on__ = 'postgresql > 8.3' @classmethod def setup_class(cls): |