[Tile-serving] [openstreetmap/osm2pgsql] Fix deletion on update in gazetteer (#1008)
Sarah Hoffmann
notifications at github.com
Sun Dec 1 10:31:18 UTC 2019
lonvia commented on this pull request.
> {
- assert(!m_inflight);
-
- std::string sql = "DELETE FROM ";
- sql.reserve(buffer->target->name.size() + buffer->deletables.size() * 15 +
- 30);
- sql += buffer->target->name;
- sql += " WHERE ";
- sql += buffer->target->id;
- sql += " IN (";
- for (auto id : buffer->deletables) {
- sql += std::to_string(id);
+ std::string sql = "DELETE FROM {} WHERE {} IN ("_format(table, column);
+ sql.reserve(m_deletables.size() * 15 + sql.size());
Added a comment.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/1008#discussion_r352334754
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20191201/bad9772c/attachment-0001.html>
More information about the Tile-serving
mailing list