Replies: 1 comment 1 reply
-
Do you actually need to do this "right after the insert"? It would be much easier to do that later. You can insert an empty column (possibly with If you really need this, you can build yourself a "start" callback by checking that the
Note that doing anything with the data in the database inside the Lua processing functions is problematic (not only because of the missing indexes), because the inserts done by osm2pgsql are buffered, so changing a row directly after inserting it will not work. But it would be okay, to create a trigger inside that |
Beta Was this translation helpful? Give feedback.
-
I want to post process an added row by using a custom query, right after the insert. At this stage I need PostGIS to process the geometries, which is not possible with the limited features in osm2pgsql.
I could just use the osmid to update the table right after the insert by using e.g. a lua postgres client inside the script, but the problem here will be that no index is created yet. Doing a full table scan after each insert will take a long time for my number of rows. Since osm2pgsql is not having start/finish callbacks I also cannot create them myself at an earlier stage (when this is possible, triggers would be much better).
How I can handle this?
Beta Was this translation helpful? Give feedback.
All reactions