Skip to content

add_row outside process_node/way/relation() function #1667

Answered by joto
SteSad asked this question in Q&A
Discussion options

You must be logged in to vote

You could do the add_row() in one of the process functions and set a global Lua variable when you have done so. But you shouldn't do tricks like that. For one I am not sure whether defining a table without id columns will work and, if it doesn't, you end up with a table with some kind of OSM id column and every time osm2pgsql sees a change it will try to delete the feature from that table, which adds more overhead.

If you insist in doing this from Lua, you can use the Lua Postgresql package do access the database from there. That would be a cleaner solution at least.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by SteSad
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants