[Tile-serving] [osm2pgsql-dev/osm2pgsql] Fix table:insert for tables without an id column (PR #2318)

Sarah Hoffmann notifications at github.com
Sun Apr 13 16:49:55 UTC 2025


Trying to insert anything into a table that has no id column defined currently fails with:

```
Error in 'insert': Trying to add node to table 'foo'
```

That's because we have added sanity checks to match the currently handled object type to the table. The check used to let id-less tables pass until a6d6ab1a4cd1253e997c239df9fdfd8e7d974b1c added a special enum type for id types which distinguishes between "any" and "no_index" id columns.
You can view, comment on, or merge this pull request online at:

  https://github.com/osm2pgsql-dev/osm2pgsql/pull/2318

-- Commit Summary --

  * always allow table insertion for id-less tables

-- File Changes --

    M src/flex-table.cpp (5)
    A tests/bdd/flex/table-ids.feature (57)
    M tests/bdd/steps/geometry_factory.py (2)

-- Patch Links --

https://github.com/osm2pgsql-dev/osm2pgsql/pull/2318.patch
https://github.com/osm2pgsql-dev/osm2pgsql/pull/2318.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/osm2pgsql-dev/osm2pgsql/pull/2318
You are receiving this because you are subscribed to this thread.

Message ID: <osm2pgsql-dev/osm2pgsql/pull/2318 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20250413/0e2e9a57/attachment.htm>


More information about the Tile-serving mailing list