# HG changeset patch # User Samuel Trégouët # Date 1450171973 -3600 # Node ID 36838a012cccc548ab4a1224ea741111b62caafc # Parent 1df243392d45b79474daf2770cc501e9c4d55022 [dataimport] massive_store: ignore primary key when requesting indexes on a table Primary keys show up in both lists of constraints and indexes. Pick a side and stick to it. diff -r 1df243392d45 -r 36838a012ccc dataimport/massive_store.py --- a/dataimport/massive_store.py Tue Dec 15 10:28:39 2015 +0100 +++ b/dataimport/massive_store.py Tue Dec 15 10:32:53 2015 +0100 @@ -717,6 +717,7 @@ LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace WHERE c.relkind IN ('i','') AND c2.relname = '%s' + AND i.indisprimary = FALSE AND n.nspname NOT IN ('pg_catalog', 'pg_toast') AND pg_catalog.pg_table_is_visible(c.oid);''' % tablename indexes_list = self.cnx.system_sql(sql).fetchall()