Skip to content

Commit 93624b0

Browse files
committedMay 30, 2017
Pass "service" parameter to gdal when opening PostGIS Rasters
Closes #16626 for 2.18
1 parent 7266410 commit 93624b0

File tree

1 file changed

+3
-2
lines changed
  • python/plugins/db_manager/db_plugins/postgis

1 file changed

+3
-2
lines changed
 

‎python/plugins/db_manager/db_plugins/postgis/plugin.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@ def info(self):
303303
def gdalUri(self, uri=None):
304304
if not uri:
305305
uri = self.database().uri()
306+
service = (u'service=%s' % self.service()) if self.service() else ''
306307
schema = (u'schema=%s' % self.schemaName()) if self.schemaName() else ''
307308
dbname = (u'dbname=%s' % uri.database()) if uri.database() else ''
308309
host = (u'host=%s' % uri.host()) if uri.host() else ''
@@ -317,8 +318,8 @@ def gdalUri(self, uri=None):
317318
col = u'column=%s' % fld.name
318319
break
319320

320-
gdalUri = u'PG: %s %s %s %s %s mode=2 %s %s table=%s' % \
321-
(dbname, host, user, passw, port, schema, col, self.name)
321+
gdalUri = u'PG: %s %s %s %s %s %s mode=2 %s %s table=%s' % \
322+
(service, dbname, host, user, passw, port, schema, col, self.name)
322323

323324
return gdalUri
324325

0 commit comments

Comments
 (0)
Please sign in to comment.