+ applied patch from numenor
This commit is contained in:
parent
2eec236fc2
commit
e9a0f020b4
1 changed files with 2 additions and 2 deletions
|
@ -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);
|
std::string table_name = boost::algorithm::to_lower_copy(sql);
|
||||||
boost::algorithm::replace_all(table_name,"\n"," ");
|
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)
|
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)
|
if (idx != std::string::npos)
|
||||||
{
|
{
|
||||||
table_name=table_name.substr(idx);
|
table_name=table_name.substr(idx);
|
||||||
|
|
Loading…
Reference in a new issue