Skip to content

Commit 8a932d2

Browse files
committed
GRASS v.in.ogr.qgis postgres - set schemas option, fixes #7427
1 parent 58266c1 commit 8a932d2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/plugins/grass/qgsgrassmodule.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -3401,9 +3401,11 @@ void QgsGrassModuleGdalInput::updateQgisLayers()
34013401
QgsDataSourceURI dsUri( provider->dataSourceUri() );
34023402
uri = "PG:" + dsUri.connectionInfo();
34033403

3404-
if ( dsUri.schema() != "" )
3404+
// Starting with GDAL 1.7.0, it is possible to restrict the schemas
3405+
// layer names are then listed without schema if only one schema is specified
3406+
if ( !dsUri.schema().isEmpty() )
34053407
{
3406-
ogrLayer = dsUri.schema() + ".";
3408+
uri += " schemas=" + dsUri.schema();
34073409
}
34083410

34093411
ogrLayer += dsUri.table();

0 commit comments

Comments
 (0)