view schema/updates/1310/01.import-changed.sql @ 5680:a87900c0fd11 sr-v2

Remove triangles that are not registered in the spatial index.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Sun, 11 Feb 2024 18:40:37 +0100
parents 47922c1a088d
children
line wrap: on
line source

ALTER TABLE import.imports ADD COLUMN changed timestamp WITH time zone NOT NULL DEFAULT CURRENT_TIMESTAMP;

UPDATE import.imports imp SET
  changed = (SELECT coalesce(max(time), imp.changed)
             FROM import.import_logs
             WHERE import_id = imp.id);