changeset 5663:a26d2afe0c01

Fixed access rights shenanigans with geonames import. Getting the file access rights right, so that db server side COPY works is somewhat a PITA, we are using the client side \copy command now.
author Sascha Wilde <wilde@sha-bang.de>
date Wed, 29 Nov 2023 13:22:05 +0100
parents 949f399d0e71
children daa39433bef1
files schema/geonames-import/import-geonames.sql
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/schema/geonames-import/import-geonames.sql	Wed Nov 29 12:16:41 2023 +0100
+++ b/schema/geonames-import/import-geonames.sql	Wed Nov 29 13:22:05 2023 +0100
@@ -34,7 +34,8 @@
        modification_date timestamp
 );
 
-COPY geonames_import_tmp FROM :'filename' WITH NULL '';
+\set cpycmd '\\copy geonames_import_tmp FROM ' :'filename' ' WITH NULL \'\';'
+:cpycmd
 
 INSERT INTO waterway.geonames
   SELECT geonameid,