Bug report #16625
DBManager fails to load raster from dbname-less connection
|Affected QGIS version:||2.18.9||Regression?:||Yes|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||Yes||Resolution:|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||24525|
I made a PostGIS connection with no database name, to rely on libpq defaults.
DBManager is capable of using the connection and shows me the available tables, but when attempting to add a raster layer on the map I get an error about the connection being invalid, specifying that "Cannot open GDAL dataset 'PG:..' You must specify at least a db name".
Note that loading a Vector (GEOMETRY) layer or a simple table works just fine.
I guess DBManager could figure out the dbname from the connection and pass it to GDAL, as a fix.
Add test for DBManager's PostGIS connector and plugin
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.