Bug report #9230

Double quote schema and table names

Added by Bernhard Ströbl almost 11 years ago. Updated almost 9 years ago.

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

Description

I regularly use upper case letters in my table names. Upon loading such a relation the PostGIS error log (and the PostgreSQL server's error log) fill with this type of message:

Erroneous query: SELECT estimated_extent('my_schema','MY_Table','the_geom') returned 7 [ERROR: relation "my_schema.my_table" does not exist
KONTEXT: SQL statement "SELECT has_table_privilege((SELECT usesysid FROM pg_user WHERE usename = session_user), 'my_schema.MY_Table', 'select')"
]

the following statement works: SELECT has_table_privilege((SELECT usesysid FROM pg_user WHERE usename = session_user), '"my_schema"."MY_Table"', 'select')

the layer loads ok, though, but it would be nice if the log only shows "real" errors


Related issues

Duplicated by QGIS Application - Bug report #12478: Estimated extent of PostGIS layers with mixed case names Closed 2015-03-31

History

#1 Updated by Sebastian Dietrich almost 9 years ago

  • Resolution set to duplicate
  • Status changed from Open to Closed

Somehow the whole discussion happened in the duplicate (#12478), so I close this as duplicate.

Also available in: Atom PDF