[Qgis-developer] QGIS choosing invalid primary key column

Ivan Mincik ivan.mincik at gmail.com
Mon Jun 11 02:37:05 PDT 2012


Hi friends,
I have found that QGIS is not choosing proper 'gid serial' primary key
column when integer column with unique constraint exists in table.

Example:
I have following table called 'vranov.v_budovy':
  - gid serial PRIMARY KEY,
  - id_cis_supisne_cisla integer REFERENCES
gisdata.t_cis_supisne_cisla(id) ON DELETE SET NULL UNIQUE,
  - the_geom geometry

I have the same tables in other database schemas with the same problem.


1. After loading this table, QGIS will incorrectly choose
'id_cis_supisne_cisla' column instead of proper PostGIS primary key 'gid'.

2. After removing unique constraint, 'gid' column will be correctly chosen.

Qgis debug log is attached.

Qgis 1.7, Debian Squeeze Linux. Can anybody confirm ?


-- 
Ivan Mincik
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qgis.log
Type: text/x-log
Size: 15766 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20120611/c94b99fd/attachment-0001.bin>


More information about the Qgis-developer mailing list