[Tile-serving] [openstreetmap/osm2pgsql] Add an sql wrapper around passed value in an add_row function (#1524)
Nikolai Lebedev
notifications at github.com
Tue Jun 8 21:31:52 UTC 2021
You're right in saying things get complex and buggy when you add such features, but osm2pgsql users shouldn't be afraid of postgres exceptions.
There definitely are some workarounds, ie that case with "serial" could be solved with `generated always` column before your fix.
Triggers and views help a lot, and imo there should be a way to not overwrite existing tables in create mode. All temporary and final tables can be generated beforehand, so it's just a matter of one flag in the code and willpower:) This can be marked with "experimental" and "use with caution", so when postgres throws errors in this case - just let it be.
Regarding `COPY`: afaik it can use a SELECT or VALUES statement as a data source, can this be of any help?
There are some discussions here about allowing plain sql queries in lua script, this also can be handy. Imagine you allow user to transform records with sql right before copying imported data from temporary to final table. Such a feature reduces the need for geometry functions in lua scripts.
--
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/discussions/1524#discussioncomment-842377
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20210608/471c1527/attachment.htm>
More information about the Tile-serving
mailing list