]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- Fixed regression caused by release 0.8.5 / 0.9.3's compatibility
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 25 Mar 2014 16:26:42 +0000 (12:26 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 25 Mar 2014 16:27:03 +0000 (12:27 -0400)
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

doc/build/changelog/changelog_08.rst
lib/sqlalchemy/dialects/postgresql/base.py
test/dialect/postgresql/test_reflection.py

index 79295f960503b06b313600dec676fae135dbca11..f8f42329577c590a85d7eb9e46db25be2773ee84 100644 (file)
 .. changelog::
     :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,
index c15e4341715b8a5e7ba83188535338ef32228294..2e2396b4d131114961bff221dcec10a2b050296b 100644 (file)
@@ -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")
             )
 
index ea8a1a5e846b41067b8a529be2e9e855843a3455..6c0f3ba20ca36f3b90c1d54b435a54821067dac6 100644 (file)
@@ -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):