Skip to content

Commit a53f660

Browse files
committedMay 30, 2017
Pass "service" parameter to gdal when opening PostGIS Rasters
See #16626 - needs backport to 2.18
1 parent efe6109 commit a53f660

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
@@ -310,6 +310,7 @@ def info(self):
310310
def gdalUri(self, uri=None):
311311
if not uri:
312312
uri = self.database().uri()
313+
service = (u'service=%s' % self.service()) if self.service() else ''
313314
schema = (u'schema=%s' % self.schemaName()) if self.schemaName() else ''
314315
dbname = (u'dbname=%s' % uri.database()) if uri.database() else ''
315316
host = (u'host=%s' % uri.host()) if uri.host() else ''
@@ -324,8 +325,8 @@ def gdalUri(self, uri=None):
324325
col = u'column=%s' % fld.name
325326
break
326327

327-
gdalUri = u'PG: %s %s %s %s %s mode=2 %s %s table=%s' % \
328-
(dbname, host, user, passw, port, schema, col, self.name)
328+
gdalUri = u'PG: %s %s %s %s %s %s mode=2 %s %s table=%s' % \
329+
(service dbname, host, user, passw, port, schema, col, self.name)
329330

330331
return gdalUri
331332

0 commit comments

Comments
 (0)
Please sign in to comment.