osm2pgsql icon indicating copy to clipboard operation
osm2pgsql copied to clipboard

How to handle ids for tables that should not auto-delete

Open joto opened this issue 4 months ago • 0 comments

Normal osm2pgsql tables have an id column and osm2pgsql make sure to delete objects from them if those objects are deleted or changed. But this is not always the case, especially with the new delete callbacks.

The current way to handle this is to not set a "magic" id column, but add an id column manually that osm2pgsql doesn't know about. But that seems counterintuitive and osm2pgsql will also print a warning about an id-less table.

I see two options:

  1. Add some option to the ids setting when creating the table, something like auto_delete=off or so.
  2. Add explicit id types to other types such as int, so that osm2pgsql can know that those special types are used as ids and remove the warning.

joto avatar Sep 15 '25 12:09 joto