Skip to content
Permalink
Browse files

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 93624b0865bf19b328fd0e8cc5cc4330bffd8be2
Showing with 3 additions and 2 deletions.
  1. +3 −2 python/plugins/db_manager/db_plugins/postgis/plugin.py
@@ -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 ''
@@ -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

0 comments on commit 93624b0

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