.. 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
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