From 59351acf88eda2d07ba41e2f7f70a2fba41b89d2 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Mon, 26 May 2025 01:31:12 +0200 Subject: Schema: Add functions to get a list of municipality and county codes. We subdivide administrative polygons to speed up things, cf. https://symphony.is/about-us/blog/boosting-postgis-performance --- import_source.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'import_source.py') diff --git a/import_source.py b/import_source.py index 46ec1e9..13a8e6c 100644 --- a/import_source.py +++ b/import_source.py @@ -376,7 +376,7 @@ def clearLayer(ds : gdal.Dataset, lyr : ogr.Layer) -> None: drv = ds.GetDriver() if drv.ShortName == 'PostgreSQL': # https://www.postgresql.org/docs/15/sql-truncate.html - query = 'TRUNCATE TABLE {table} CONTINUE IDENTITY RESTRICT' + query = 'TRUNCATE TABLE {table} CONTINUE IDENTITY CASCADE' op = 'Truncating' else: query = 'DELETE FROM {table}' -- cgit v1.2.3