[Tile-serving] [openstreetmap/osm2pgsql] Store settings to a database table and retrieve for updates (PR #1963)
Jochen Topf
notifications at github.com
Fri May 19 14:04:04 UTC 2023
Store command line settings in a database table called "osm2pgsql_settings" when importing data. This is mainly so that we can do updates without specifying those settings again (or checking that the settings match the ones used for import.)
The table always has the same name and will be stored in the schema used for the middle tables (set with --middle-schema).
Adds a new generic settings_t class which can store string, integer and boolean settings. Internally a map of strings is used for the settings, in the database a simple table with two text columns: option and value. For boolean values strings 'true' and 'false' are used.
Currently the following settings are stored in the database:
- "attributes" (bool): -x/--extra-attributes setting
- "flat-nodes": flat node file name
- "prefix": prefix from --prefix
- "updatable" (bool): can the database be updated, i.e. created with --slim and no --drop
- "version": osm2pgsql version
You can view, comment on, or merge this pull request online at:
https://github.com/openstreetmap/osm2pgsql/pull/1963
-- Commit Summary --
* Store settings to a database table and retrieve for updates
-- File Changes --
M src/CMakeLists.txt (1)
M src/options.cpp (1)
M src/options.hpp (1)
M src/osm2pgsql.cpp (117)
M src/pgsql-capabilities.cpp (4)
A src/settings.cpp (175)
A src/settings.hpp (104)
M tests/CMakeLists.txt (1)
A tests/bdd/regression/settings.feature (52)
M tests/bdd/regression/update.feature (1)
A tests/test-settings.cpp (155)
-- Patch Links --
https://github.com/openstreetmap/osm2pgsql/pull/1963.patch
https://github.com/openstreetmap/osm2pgsql/pull/1963.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/osm2pgsql/pull/1963
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/osm2pgsql/pull/1963 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20230519/3dab656e/attachment.htm>
More information about the Tile-serving
mailing list