[Tile-serving] [openstreetmap/osm2pgsql] Fix in flex output: Updating tables without geometry should work (#1197)

Sarah Hoffmann notifications at github.com
Wed Jun 3 07:35:25 UTC 2020


@lonvia commented on this pull request.



> @@ -1115,10 +1115,19 @@ void output_flex_t::delete_from_table(table_connection_t *table_connection,
 {
     assert(table_connection);
     auto const id = table_connection->table().map_id(type, osm_id);
-    auto const result = table_connection->get_geom_by_id(type, id);
-    if (m_expire.from_result(result, id) != 0) {
-        table_connection->delete_rows_with(type, id);
+
+    if (table_connection->table().has_geom_column()) {
+        auto const result = table_connection->get_geom_by_id(type, id);
+
+        if (m_expire.from_result(result, id) == 0) {

The short-cut here should now apply when result.num_tuples == 0. If you test the result of `from_result` then you don't catch the case where the expiry is disabled.

-- 
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/1197#pullrequestreview-423291295
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20200603/7a84556d/attachment.htm>


More information about the Tile-serving mailing list