[Tile-serving] [openstreetmap/osm2pgsql] Add an sql wrapper around passed value in an add_row function (#1524)
Jochen Topf
notifications at github.com
Tue Jun 8 20:01:16 UTC 2021
As you just found out (see #1522) exposing database features to the osm2pgsql user is difficult to handle and error prone. There are just too many thing that can go wrong and they restrict what kind of changes we can later do in osm2pgsql. We therefore try to avoid this as much as possible.
In this case we can't even do what you want (if I understand you correctly), because of the way the COPY command works. Unlike with the INSERT command, you can only send *data* through a COPY, not call functions and the like.
Any kind of processing you want to do in the database is probably best done with database methods such as triggers and views. PostgreSQL supports many clever tricks and workarounds and they are, admittedly often difficult to use, but its only a small minority who needs these things. It would probably be interesting to start collecting these tricks and documenting them, though.
--
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-841995
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20210608/8fc4c091/attachment.htm>
More information about the Tile-serving
mailing list