Skip to content
Permalink
Browse files

Pass "service" parameter to gdal when opening PostGIS Rasters

See #16626 - needs backport to 2.18
  • Loading branch information
strk committed May 30, 2017
1 parent efe6109 commit a53f66048c575c12b1c363d3aecd7d8e21bf57f2
Showing with 3 additions and 2 deletions.
  1. +3 −2 python/plugins/db_manager/db_plugins/postgis/plugin.py
@@ -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 ''
@@ -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

0 comments on commit a53f660

Please sign in to comment.
You can’t perform that action at this time.