[Tile-serving] [openstreetmap/osm2pgsql] Add tilesets to flex output allowing more flexible expire configuration (PR #1912)

Jochen Topf notifications at github.com
Tue Feb 14 16:18:29 UTC 2023


@joto commented on this pull request.



> +                                  std::string const &schema,
+                                  std::string const &table)
+{
+    auto const qn = qualified_name(schema, table);
+
+    pg_conn_t connection{conninfo};
+
+    connection.exec("PREPARE insert_tiles(int4, int4, int4) AS"
+                    " INSERT INTO {} (zoom, x, y) VALUES ($1, $2, $3)",
+                    qn);
+
+    auto const count = for_each_tile(
+        tiles_at_maxzoom, minzoom, maxzoom, [&](tile_t const &tile) {
+            connection.exec_prepared("insert_tiles", tile.zoom(), tile.x(),
+                                     tile.y());
+        });

I'll add that.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/1912#discussion_r1106050360
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/osm2pgsql/pull/1912/review/1297944060 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20230214/9bd92453/attachment.htm>


More information about the Tile-serving mailing list