another experiment
This commit is contained in:
parent
76086150b8
commit
c11d06a3dc
@ -18,11 +18,13 @@ psql -c "CREATE TABLE new_geometries (
|
||||
geometry_id serial PRIMARY KEY,
|
||||
source_id varchar(30)
|
||||
);"
|
||||
psql -c "INSERT INTO buildings ( geometry_id, ref_toid )
|
||||
SELECT geometry_id, source_id
|
||||
FROM geometries
|
||||
ON CONFLICT ( ref_toid )
|
||||
DO UPDATE SET new_geometries.source_id=EXCLUDED.ref_toid
|
||||
psql -c "WITH new_geometries AS (
|
||||
INSERT INTO buildings ( geometry_id, ref_toid )
|
||||
SELECT geometry_id, source_id
|
||||
FROM geometries
|
||||
ON CONFLICT ( ref_toid )
|
||||
DO NOTHING RETURNING *
|
||||
)
|
||||
;"
|
||||
|
||||
# for building in buildings
|
||||
|
Loading…
Reference in New Issue
Block a user