[Tile-serving] [openstreetmap/osm2pgsql] Generalization: Allow setting condition for running SQL commands (PR #2064)

Jochen Topf notifications at github.com
Sun Sep 3 14:00:46 UTC 2023


If a condition is set with "if_has_rows", the SQL command in "if_has_rows" will be run and only if that returns any rows, the main sql command is run. This check happens only in "append" mode, in "create" mode the command is always run.

To be used with something like "SELECT 1 FROM some_table LIMIT 1" to check whether the table has any rows (for instance an expire table).
You can view, comment on, or merge this pull request online at:

  https://github.com/openstreetmap/osm2pgsql/pull/2064

-- Commit Summary --

  * Generalization: Allow setting condition for running SQL commands

-- File Changes --

    M src/gen/osm2pgsql-gen.cpp (16)

-- Patch Links --

https://github.com/openstreetmap/osm2pgsql/pull/2064.patch
https://github.com/openstreetmap/osm2pgsql/pull/2064.diff

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

Message ID: <openstreetmap/osm2pgsql/pull/2064 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20230903/4c22a760/attachment-0001.htm>


More information about the Tile-serving mailing list