Bug report #13607

DBManager doesn't allow to load PostGis Raster with a number as first character

Added by Loïc BARTOLETTI over 8 years ago. Updated about 5 years ago.

Category:DB Manager
Affected QGIS version:2.8.3 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:end of life
Crashes QGIS or corrupts data:No Copied to github as #:21646


DBManager doesn't allow to load PostGis Raster with a number as first character. The same Raster into PostGis can't be load if the first character of table name is a digit.

Here, some tests with table name:

rast : allowed
2rast : unallowed
_rast : allowed


#1 Updated by Sebastian Dietrich over 8 years ago

This is a GDAL bug. GDAL does not quote identifiers, usernames and passwords. Instead it actually removes quotes when they are given in the connection string.

While rast does not need quoting, 2rast needs to be quoted. So SELECT * FROM rast works but SELECT * FROM 2rast gives a syntax error.

To reproduce run on the commandline:

gdalinfo "PG: dbname=database host= user=username password=pass port=5432 mode=2 schema=public column=rast table=2rast" 

Note that the following are related errors:
  • schemanames/layernames/columnnames containing uppercase letters
  • schemanames/layernames/columnnames containing spaces
  • schemas/layers/columns with a keyword as a name (e.g. select)
  • databasenames/usernames/passwords containing spaces

So please close this bug and head over to the GDAL PostGIS Raster driver and open a new one there.

#2 Updated by Giovanni Manghi about 7 years ago

  • Easy fix? set to No
  • Regression? set to No

#3 Updated by Giovanni Manghi about 5 years ago

  • Resolution set to end of life
  • Status changed from Open to Closed

Also available in: Atom PDF