diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-10-27 18:14:44 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2013-10-27 18:14:44 -0400 |
| commit | 1e2945d26c126f0aad0dbe1c06fdcb62d3172597 (patch) | |
| tree | 9210335c72267fea7ae9730ce4e92cd91b1d31d0 | |
| parent | fe7322a05559534fcbacb8ae9ffc1707e3b2f261 (diff) | |
| download | sqlalchemy-1e2945d26c126f0aad0dbe1c06fdcb62d3172597.tar.gz | |
- Fixed bug where index reflection would mis-interpret indkey values
when using the pypostgresql adapter, which returns these values
as lists vs. psycopg2's return type of string.
[ticket:2855]
| -rw-r--r-- | doc/build/changelog/changelog_08.rst | 12 | ||||
| -rw-r--r-- | doc/build/changelog/changelog_09.rst | 3 | ||||
| -rw-r--r-- | lib/sqlalchemy/__init__.py | 2 | ||||
| -rw-r--r-- | lib/sqlalchemy/dialects/postgresql/base.py | 5 |
4 files changed, 20 insertions, 2 deletions
diff --git a/doc/build/changelog/changelog_08.rst b/doc/build/changelog/changelog_08.rst index 7066916fa..77e70c88a 100644 --- a/doc/build/changelog/changelog_08.rst +++ b/doc/build/changelog/changelog_08.rst @@ -8,6 +8,18 @@ .. include:: changelog_07.rst .. changelog:: + :version: 0.8.4 + + .. change:: + :tags: bug, postgresql + :tickets: 2855 + :versions: 0.9.0b2 + + Fixed bug where index reflection would mis-interpret indkey values + when using the pypostgresql adapter, which returns these values + as lists vs. psycopg2's return type of string. + +.. changelog:: :version: 0.8.3 :released: October 26, 2013 diff --git a/doc/build/changelog/changelog_09.rst b/doc/build/changelog/changelog_09.rst index 591a36692..27faaba1d 100644 --- a/doc/build/changelog/changelog_09.rst +++ b/doc/build/changelog/changelog_09.rst @@ -10,6 +10,9 @@ .. include:: changelog_07.rst .. changelog:: + :version: 0.9.0b2 + +.. changelog:: :version: 0.9.0b1 :released: October 26, 2013 diff --git a/lib/sqlalchemy/__init__.py b/lib/sqlalchemy/__init__.py index f40603258..b41f3f2bc 100644 --- a/lib/sqlalchemy/__init__.py +++ b/lib/sqlalchemy/__init__.py @@ -116,7 +116,7 @@ from .schema import ( from .inspection import inspect from .engine import create_engine, engine_from_config -__version__ = '0.9.0b1' +__version__ = '0.9.0b2' def __go(lcls): global __all__ diff --git a/lib/sqlalchemy/dialects/postgresql/base.py b/lib/sqlalchemy/dialects/postgresql/base.py index 5c88ee023..e1dc4af71 100644 --- a/lib/sqlalchemy/dialects/postgresql/base.py +++ b/lib/sqlalchemy/dialects/postgresql/base.py @@ -1963,11 +1963,14 @@ class PGDialect(default.DefaultDialect): table_oid = self.get_table_oid(connection, table_name, schema, info_cache=kw.get('info_cache')) + # cast indkey as varchar since it's an int2vector, + # returned as a list by some drivers such as pypostgresql + IDX_SQL = """ SELECT i.relname as relname, ix.indisunique, ix.indexprs, ix.indpred, - a.attname, a.attnum, ix.indkey + a.attname, a.attnum, ix.indkey::varchar FROM pg_class t join pg_index ix on t.oid = ix.indrelid |
