diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2025-05-26 01:31:12 +0200 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2025-05-26 12:11:46 +0200 |
commit | 59351acf88eda2d07ba41e2f7f70a2fba41b89d2 (patch) | |
tree | 48cdcddd90585989148efedc0661849441fa6734 /import_source.py | |
parent | 6924ae6a7243410c040b21a80f3b03ddfcd9e7df (diff) |
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
Diffstat (limited to 'import_source.py')
-rw-r--r-- | import_source.py | 2 |
1 files changed, 1 insertions, 1 deletions
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}' |