[Tile-serving] [osm2pgsql-dev/osm2pgsql] Creating a primary key on the id columns does not work (Issue #2380)
Jochen Topf
notifications at github.com
Mon Aug 18 14:06:58 UTC 2025
joto left a comment (osm2pgsql-dev/osm2pgsql#2380)
I am reopening this because there is clearly a failure in out testing here that needs to be addressed. The test in `
tests/bdd/flex/lua-table-definitions.feature` uses `index` instead of `create_index` and still does not fail.
I think there are two problems with this tests:
1. The tests do not check that the indexes are actually created in the right way. We could check this by accessing `pg_indexes` but we currently don't have a way of checking that in our arsenal of tests. I think we need some way of checking table/view contents against regular expression. In this case we might want to check that `SELECT indexdef FROM pg_indexes WHERE tablename='foo'` contains `UNIQUE` or something like that.
2. We did not notice that we were not using the correct `create_index` and used `index` instead. osm2pgsql doesn't check for settings it doesn't know about so that we can introduce them later without old versions of osm2pgsql breaking. But maybe we should at least check and print a warning? And then have a mechanism that turns those warnings into errors for tests?
--
Reply to this email directly or view it on GitHub:
https://github.com/osm2pgsql-dev/osm2pgsql/issues/2380#issuecomment-3197089380
You are receiving this because you are subscribed to this thread.
Message ID: <osm2pgsql-dev/osm2pgsql/issues/2380/3197089380 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/tile-serving/attachments/20250818/374d1d9b/attachment.htm>
More information about the Tile-serving
mailing list