Opened 7 years ago

Closed 5 years ago

#6910 closed defect (wontfix)

Postgis raster driver requires a `dbname` parameter - failing to allow for `service` only datasource

Reported by: strk Owned by: warmerdam
Priority: normal Milestone: closed_because_of_github_migration
Component: GDAL_Raster Version: svn-trunk
Severity: normal Keywords:
Cc: jorgearevalo

Description

The libpq library doesn't require a dbname parameter, relying on environment variables if present or on username, or service parameter when present.

The postgisraster driver instead insists in having a dbname, failing which results in an error: "You must specify at least a db name" (at time of writing found in frmts/postgisraster/postgisrasterdataset.cpp:2489)

This ticket is to lift that restriction. See https://issues.qgis.org/issues/16626 for how this is a problem for clients of the tool.

Change History (4)

comment:1 by strk, 7 years ago

https://issues.qgis.org/issues/16625 is also due to this limitation

comment:2 by strk, 7 years ago

For the record, OGR with the PG driver works fine. Compare the two:

OGR:

$ ogrinfo "pg:"
INFO: Open of `pg:'
      using driver `PostgreSQL' successful.
1: points (Point)

GDA:

$ gdalinfo "pg:"
ERROR 1: You must specify at least a db name
gdalinfo failed - unable to open 'pg:'.

comment:3 by strk, 7 years ago

Cc: jorgearevalo added

Jorge, any chance you're going to take a look at this ?

comment:4 by Even Rouault, 5 years ago

Milestone: closed_because_of_github_migration
Resolution: wontfix
Status: newclosed

This ticket has been automatically closed because Trac is no longer used for GDAL bug tracking, since the project has migrated to GitHub. If you believe this ticket is still valid, you may file it to https://github.com/OSGeo/gdal/issues if it is not already reported there.

Note: See TracTickets for help on using tickets.