Since version 12 PostgreSQL supports a WHERE condition on the COPY command. Use
this to add a geometry check when adding data to the database instead of the
trigger we used before.
This makes the code simpler and doesn't clutter the database with triggers.
If you have already imported a database with an older version of osm2pgsql and
want to use this new version, that will still work. But the original triggers
will still be there so there is some extra work done for each update. Simply
remove the triggers and trigger functions from the database with commands of
the form
DROP TRIGGER *_osm2pgsql_valid ON *;
DROP FUNCTION *_osm2pgsql_valid;
PostgreSQL 12 is currently the oldest database version we support.
You can view, comment on, or merge this pull request online at:
https://github.com/osm2pgsql-dev/osm2pgsql/pull/2500
-- Commit Summary --
* Replace geometry check trigger by WHERE condition on COPY
-- File Changes --
M src/db-copy.cpp (5)
M src/db-copy.hpp (12)
M src/flex-table.cpp (56)
M src/flex-table.hpp (4)
M src/pgsql-helper.cpp (41)
M src/pgsql-helper.hpp (9)
M src/table.cpp (16)
A tests/bdd/flex/invalid-after-projection.feature (58)
M tests/test-output-flex-schema.cpp (9)
-- Patch Links --
https://github.com/osm2pgsql-dev/osm2pgsql/pull/2500.patch
https://github.com/osm2pgsql-dev/osm2pgsql/pull/2500.diff
--
Reply to this email directly or view it on GitHub:
https://github.com/osm2pgsql-dev/osm2pgsql/pull/2500
You are receiving this because you are subscribed to this thread.
Message ID: <osm2pgsql-dev/osm2pgsql/pull/[email protected]>
_______________________________________________
Tile-serving mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/tile-serving