]> 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:26:42 +0000 (12:26 -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 7616a3f107e8dcb73eddfb5f57129517e30e3eb4..2b0fe2c39b3014ee81ebf76ffa72bc363ca59560 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 cea9d67b695e760c0fd3562acb2cd49eb144821c..f69a6e01085f7824c63b39c1c4167719a6702aa2 100644 (file)
@@ -2204,7 +2204,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 aefb6a0ba3ad76191556b2dbb0d3ba7fa534996e..01e14ffa0f107a52de94628a0e0757219bf6f529 100644 (file)
@@ -20,7 +20,7 @@ class DomainReflectionTest(fixtures.TestBase, AssertsExecutionResults):
 
     """Test PostgreSQL domains"""
 
-    __only_on__ = 'postgresql > 8.2'
+    __only_on__ = 'postgresql > 8.3'
 
     @classmethod
     def setup_class(cls):