Bug report #10600

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

Added by Sandro Santilli over 2 years ago. Updated about 1 year ago.

Status:Closed Start Date:06/16/2014
Priority:Normal Due date:
Assigned to:Sandro Santilli % Done:

0%

Category:DBManager
Target version:Version 2.14
Platform: Pull Request or Patch supplied:No
Platform version: Affected version:2.2.0
Status info: Causes crash or corruption:No
Resolution:fixed/implemented Tag:

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 (2.3 kB) Sandro Santilli, 01/19/2016 03:27 am

Associated revisions

Revision da372c8d40b1f81eb2fc307edc77199ba540bf10
Added by Sandro Santilli about 1 year ago

Ensure "dbname" is always set in the uri

Fixes #10600

History

Updated by Sandro Santilli about 2 years ago

This is still an issue in master (pre 2.8.0)

Updated by Sandro Santilli about 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)

Updated by Sandro Santilli about 1 year ago

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

Updated by Sandro Santilli about 1 year ago

  • Status changed from In Progress to Closed

Updated by J├╝rgen Fischer about 1 year ago

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

Updated by Sandro Santilli about 1 year ago

Yes, GDAL complained at least a dbname was needed.

Updated by Sandro Santilli about 1 year ago

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

Updated by Sandro Santilli about 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

Updated by Sandro Santilli about 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 ?

Updated by Sandro Santilli about 1 year ago

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

Updated by Sandro Santilli about 1 year ago

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

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