Bug report #16626
DBManager fails to load rasters from service-only PostGIS connections
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | Sandro Santilli | ||
Category: | DB Manager | ||
Affected QGIS version: | 2.18.9 | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | Yes | Resolution: | |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 24526 |
Description
When PostGIS connections are defined by use of the "service" parameter the raster load (mediated by OGR) fails to work.
Other kind of layers (vector, table-only) work fine.
This is with GDAL-2.3.0 (not sure it matters)
The problem reported by GDAL is that you need at least a DBNAME.
The string passed to ogr doesn't look like including a "service" parameter so it's probbaly never sent by DBManager.
Related issues
Associated revisions
Pass "service" parameter to gdal when opening PostGIS Rasters
Closes #16626 for 2.18
Fix typo in URI service extraction (introduced in 93624b08)
Also add a comment about lack of support in GDAL up to 2.2.x for
service specification in datasource uri
Ref #16626
Fix typo in URI service extraction (introduced in 93624b08)
Also add a comment about lack of support in GDAL up to 2.2.x for
service specification in datasource uri
Ref #16626
For GDAL sake extract a dbname from the connection
Works around GDAL limitation reported in:
https://trac.osgeo.org/gdal/ticket/6910
For GDAL sake extract a dbname from the connection
Works around GDAL limitation reported in:
https://trac.osgeo.org/gdal/ticket/6910
Add DBManager test for service-only URI
Ref #16626
Also fixes runs with non-standard QGIS_PGTEST_DB env variable set
Add test for DBManager's PostGIS connector and plugin
Only enabled when ENABLE_PGTEST is set
Includes test for dbname-less URI and service-only URI
(ref #10600 ref #16625 ref #16626)
The test connects to the `qgis_test` database, or what the
QGIS_PGTEST_DB variable requests (as per tests/README.md)
A raster table is added to the test postgis setup script,
for use by this new test.
History
#1 Updated by Sandro Santilli over 7 years ago
- Related to Bug report #14436: Failure to connect to postgres database defined as service in DB manager added
#2 Updated by Sandro Santilli over 7 years ago
- Pull Request or Patch supplied changed from No to Yes
PR for master branch: https://github.com/qgis/QGIS/pull/4639
#3 Updated by Sandro Santilli over 7 years ago
- Affected QGIS version changed from 2.18.8 to 2.18.9
PR for 2.18 branch: https://github.com/qgis/QGIS/pull/4647
#4 Updated by Sandro Santilli over 7 years ago
- % Done changed from 0 to 100
- Status changed from Open to Closed
Applied in changeset qgis|93624b0865bf19b328fd0e8cc5cc4330bffd8be2.
#5 Updated by Sandro Santilli over 7 years ago
- Status changed from Closed to Reopened
Reopening because it looks like ogr does not recognize "service" anyway, insisting about having a `dbname` value.
#6 Updated by Sandro Santilli over 7 years ago
So I guess a fix here would be to pre-connect with psycopg to find out the name of the database and provide it in the URI.
#7 Updated by Sandro Santilli over 7 years ago
Upstream ticket to GDAL was filed here: https://trac.osgeo.org/gdal/ticket/6910
#8 Updated by Sandro Santilli over 7 years ago
78c3423861 implements the fix suggested in #16626-6 for master branch
backport (and overall automated tests) still pending
#9 Updated by Sandro Santilli over 7 years ago
- Status changed from Reopened to Closed
Applied in changeset qgis|6f42b784b98580257e584ca6fec57809bdd56bc0.