Bug report #7159

PostGIS geometry columns with parens in field name not supported

Added by Sandro Santilli almost 12 years ago. Updated almost 12 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Data Provider/PostGIS
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:16216

Description

I've a table with a geometry field named "A+(B-a)" but qgis refuses to open it with the message:

dbname='strk' port=5432 key='edge_id' srid=0 type=POLYGON table="strk"."marcobug" (A+(B-A)) sql= is an invalid layer and cannot be loaded.

This is as of 314d144

Associated revisions

Revision b630692c
Added by Jürgen Fischer almost 12 years ago

quote closing parens within column names (fixes #7159)

History

#1 Updated by Sandro Santilli almost 12 years ago

The problem persists with current master (c036e7e)

#2 Updated by Sandro Santilli almost 12 years ago

Console log shows:

ERROR: column "A+(B-A" of relation "marcobug" does not exist

The first bogus trace in the logs I see is here:

Debug: src/providers/postgres/qgspostgresprovider.cpp: 58: (QgsPostgresProvider) URI: dbname='strk' port=5432 key='edge_id' srid=0 type=POLYGON table="strk"."marcobug" (A+(B-A) sql=

#3 Updated by Sandro Santilli almost 12 years ago

At time of

emit addDatabaseLayers( mSelectedTables, "postgres" );

The mSelectedTables correctly contains the field name.

What handles that QStringArray before it gets to QgsPostgresProvider::QgsPostgresProvider( QString const & uri ) where it is found to be already corrupted ?

#4 Updated by Jürgen Fischer almost 12 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF