Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Pass "service" parameter to gdal when opening PostGIS Rasters
Closes #16626 for 2.18
  • Loading branch information
strk committed May 30, 2017
1 parent 7266410 commit 93624b0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions python/plugins/db_manager/db_plugins/postgis/plugin.py
Expand Up @@ -303,6 +303,7 @@ def info(self):
def gdalUri(self, uri=None):
if not uri:
uri = self.database().uri()
service = (u'service=%s' % self.service()) if self.service() else ''
schema = (u'schema=%s' % self.schemaName()) if self.schemaName() else ''
dbname = (u'dbname=%s' % uri.database()) if uri.database() else ''
host = (u'host=%s' % uri.host()) if uri.host() else ''
Expand All @@ -317,8 +318,8 @@ def gdalUri(self, uri=None):
col = u'column=%s' % fld.name
break

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

return gdalUri

Expand Down

0 comments on commit 93624b0

Please sign in to comment.