Navigation Menu

Skip to content

Commit

Permalink
Pass "service" parameter to gdal when opening PostGIS Rasters
Browse files Browse the repository at this point in the history
See #16626 - needs backport to 2.18
  • Loading branch information
strk committed May 30, 2017
1 parent efe6109 commit a53f660
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 @@ -310,6 +310,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 @@ -324,8 +325,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 a53f660

Please sign in to comment.