mirror of
https://github.com/mapnik/mapnik.git
synced 2025-12-08 20:13:09 +00:00
Merge pull request #2765 from mapycz/fix-pg-datasource-srid
postgis: prefix table name with schema
This commit is contained in:
commit
7a2aae15d3
@ -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
|
||||
@ -234,6 +230,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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user