From e9a0f020b4465a27d7f3d9aef68469c87179e458 Mon Sep 17 00:00:00 2001 From: Artem Pavlenko Date: Sun, 29 Mar 2009 11:32:22 +0000 Subject: [PATCH] + applied patch from numenor --- plugins/input/postgis/postgis.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/input/postgis/postgis.cpp b/plugins/input/postgis/postgis.cpp index 732d988f7..c6103e491 100644 --- a/plugins/input/postgis/postgis.cpp +++ b/plugins/input/postgis/postgis.cpp @@ -220,11 +220,11 @@ std::string postgis_datasource::table_from_sql(const std::string& sql) std::string table_name = boost::algorithm::to_lower_copy(sql); boost::algorithm::replace_all(table_name,"\n"," "); - std::string::size_type idx = table_name.rfind("from"); + std::string::size_type idx = table_name.rfind(" from "); if (idx!=std::string::npos) { - idx=table_name.find_first_not_of(" ",idx+4); + idx=table_name.find_first_not_of(" ",idx+5); if (idx != std::string::npos) { table_name=table_name.substr(idx);