Bug report #10600

db_manager is unable to load rasters from connections with no dbname specified

Added by Sandro Santilli almost 3 years ago. Updated over 1 year ago.

Status:Closed
Priority:Normal
Assignee:Sandro Santilli
Category:DB Manager
Affected QGIS version:2.2.0 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No

Description

When a database name is not specified in a postgis connection string, relying on libpq default, the loading of postgis raster tables fails.

See also #9037

gdal_only_dbname.patch Magnifier (2.28 KB) Sandro Santilli, 01/19/2016 03:27 AM

Associated revisions

Revision da372c8d
Added by Sandro Santilli over 1 year ago

Ensure "dbname" is always set in the uri

Fixes #10600

History

#1 Updated by Sandro Santilli over 2 years ago

This is still an issue in master (pre 2.8.0)

#2 Updated by Sandro Santilli over 1 year ago

  • Status changed from Open to In Progress
  • Target version set to Version 2.14

still an issue in current master (2.14-pre)

#3 Updated by Sandro Santilli over 1 year ago

It turns out this was broken by 62b2c1fcabc88e82b0229790b56a7a9ada0f5771 to fix #11886

#4 Updated by Sandro Santilli over 1 year ago

  • Status changed from In Progress to Closed

#5 Updated by Jürgen Fischer over 1 year ago

Is the requirement to have a dbname when loading a raster layer the problem?

#6 Updated by Sandro Santilli over 1 year ago

Yes, GDAL complained at least a dbname was needed.

#7 Updated by Sandro Santilli over 1 year ago

I guess a ticket could also be filed against GDAL to request allowing that, btw

#8 Updated by Sandro Santilli over 1 year ago

  • Status changed from Closed to Reopened

Upstream filed: https://trac.osgeo.org/gdal/ticket/6316

I'm reopening this to try another approach, less intrusive

#9 Updated by Sandro Santilli over 1 year ago

I have another patch that only adds the "dbname" in the URI of raster layers, rather than in all postgresql layers.
Is it to be preferred leaving dbname undefined in the project file, when it was in the connection configuration ?

#10 Updated by Sandro Santilli over 1 year ago

I shall note that "host" and "port" are still being enforced in the URI (from before my first patch)

#11 Updated by Sandro Santilli over 1 year ago

  • Resolution set to fixed/implemented
  • File gdal_only_dbname.patchMagnifier added
  • Status changed from Reopened to Closed

Well, I'll leave master as it is. After all that's how it behaved before 62b2c1fcabc88e82b0229790b56a7a9ada0f5771 which was meant to fix another issue (username/password in project file).

The patch to restrict the scope of enforcing a "dbname" component is attached to this ticket, in case there are other views and a discussion should follow.

Also available in: Atom PDF