From edcc0565fb39b357ea836a7193f67d51d59bb768 Mon Sep 17 00:00:00 2001 From: Jiri Drbalek Date: Mon, 20 Apr 2015 11:10:45 +0000 Subject: [PATCH 1/2] postgis: prefix table name with schema --- plugins/input/postgis/postgis_datasource.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/input/postgis/postgis_datasource.cpp b/plugins/input/postgis/postgis_datasource.cpp index 570016350..d101daad2 100644 --- a/plugins/input/postgis/postgis_datasource.cpp +++ b/plugins/input/postgis/postgis_datasource.cpp @@ -234,6 +234,10 @@ postgis_datasource::postgis_datasource(parameters const& params) s << "SELECT ST_SRID(\"" << geometryColumn_ << "\") AS srid FROM "; if (!geometry_table_.empty()) { + if (!schema_.empty()) + { + s << schema_ << '.'; + } s << geometry_table_; } else From d0f19c421ad39148ee257f7c4ba32decb8b5e271 Mon Sep 17 00:00:00 2001 From: Jiri Drbalek Date: Mon, 20 Apr 2015 12:43:05 +0000 Subject: [PATCH 2/2] postgis: remove unnecessary else path --- plugins/input/postgis/postgis_datasource.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/plugins/input/postgis/postgis_datasource.cpp b/plugins/input/postgis/postgis_datasource.cpp index d101daad2..f3fe8c67f 100644 --- a/plugins/input/postgis/postgis_datasource.cpp +++ b/plugins/input/postgis/postgis_datasource.cpp @@ -154,10 +154,6 @@ postgis_datasource::postgis_datasource(parameters const& params) schema_ = geometry_table_.substr(0, idx); geometry_table_ = geometry_table_.substr(idx + 1); } - else - { - geometry_table_ = geometry_table_.substr(0); - } // NOTE: geometry_table_ how should ideally be a table name, but // there are known edge cases where this will break down and