fix insert statement

This commit is contained in:
Ed Chalstrey 2022-04-14 10:33:38 +01:00
parent d730f37190
commit 80508aa387

View File

@ -37,8 +37,10 @@ psql -c "CREATE TABLE IF NOT EXISTS new_geometries (
echo "Finding geometries that are new to this release..."
psql -c "INSERT INTO new_geometries ( source_id, geometry_geom )
SELECT source_id, geometry_geom
FROM release_geometries
WHERE NOT EXISTS ( SELECT source_id FROM geometries );"
FROM release_geometries AS r
WHERE NOT EXISTS ( SELECT source_id
FROM geometries AS g
WHERE g.source_id = r.source_id);"
echo "Adding new geometries to geometries table..."
psql -c "INSERT INTO geometries ( source_id, geometry_geom )