Bug report #13289

Issue with PostgreSQL BigInt primary keys and GetFeatureInfo

Added by Pablo Fernández Moniz over 8 years ago. Updated over 8 years ago.

Status:Closed
Priority:Normal
Assignee:Jürgen Fischer
Category:-
Affected QGIS version:2.8.0 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:21347

Description

Whenever the type of a primary key for a PostgreSQL table is defined as BigInt, the ‘Feature Attributes’ pop-up window is not displayed in case large numbers are inserted.

--element with BIGINT as PKEY (no popup)
DROP TABLE IF EXISTS ele1;
CREATE TABLE ele1(ipid bigint NOT NULL, geom geometry(LineString,32628), CONSTRAINT ele1_pkey PRIMARY KEY (ipid)) WITH (OIDS=FALSE);
CREATE INDEX spatial_index_ele1 ON ele1 USING gist (geom);

INSERT INTO ele1(ipid,geom) VALUES (1, st_geomfromewkt('SRID=32628;LINESTRING(0 0,1 0)'));
INSERT INTO ele1(ipid,geom) VALUES (111111111111111111, st_geomfromewkt('SRID=32628;LINESTRING(0 1,1 1)')); -- NO POPUP

--element without PKEY
DROP TABLE IF EXISTS ele2;
CREATE TABLE ele2( ipid bigint NOT NULL, geom geometry(LineString,32628)) WITH ( OIDS=FALSE );
CREATE INDEX spatial_index_ele2 ON ele2 USING gist (geom);

INSERT INTO ele2(ipid,geom) VALUES (2, st_geomfromewkt('SRID=32628;LINESTRING(0 2,1 2)'));
INSERT INTO ele2(ipid,geom) VALUES (222222222222222222, st_geomfromewkt('SRID=32628;LINESTRING(0 3,1 3)'));

--element with PKEY as text
DROP TABLE IF EXISTS ele3;
CREATE TABLE ele3 ( ipid text NOT NULL, geom geometry(LineString,32628), CONSTRAINT ele3_pkey PRIMARY KEY (ipid)) WITH ( OIDS=FALSE);
CREATE INDEX spatial_index_ele3 ON ele3 USING gist (geom); 

INSERT INTO ele3(ipid,geom) VALUES ('3', st_geomfromewkt('SRID=32628;LINESTRING(0 4,1 4)'));
INSERT INTO ele3(ipid,geom) VALUES ('333333333333333333', st_geomfromewkt('SRID=32628;LINESTRING(0 5,1 5)'));11111111', st_geomfromewkt('SRID=32628;LINESTRING(0 0,1 0)'));

Please check document attached for more information.

IssuewithPostgresqlbigintprimarykeys.pdf - Documento (191 KB) Pablo Fernández Moniz, 2015-08-31 07:27 AM

Associated revisions

Revision 5326c6bd
Added by Jürgen Fischer over 8 years ago

fix feature id handling when opening feature form from identify results (fixes #13289)

Revision 8b734c8e
Added by Jürgen Fischer over 8 years ago

fix feature id handling when opening feature form from identify results (fixes #13289)

(cherry picked from commit 5326c6bd1bd5aebf9975d751f840750a491641a7)

Revision 599632a7
Added by Jürgen Fischer over 8 years ago

fix feature id handling when opening feature form from identify results (fixes #13289)

(cherry picked from commit 5326c6bd1bd5aebf9975d751f840750a491641a7)

History

#1 Updated by Jürgen Fischer over 8 years ago

  • Status changed from Open to Feedback

which document?

#3 Updated by Jürgen Fischer over 8 years ago

  • Status changed from Feedback to Open

#4 Updated by Jürgen Fischer over 8 years ago

  • Assignee set to Jürgen Fischer

#5 Updated by Jürgen Fischer over 8 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF