From ed01aa8f9d726eb6229e6ecd9d7b571c927d4e13 Mon Sep 17 00:00:00 2001 From: Dashie <dashie@sigpipe.me> Date: Tue, 9 Aug 2022 16:27:09 +0200 Subject: [PATCH] Uses \copy instead of copy to uses psql copy function, avoiding access right issues --- server/scripts/ogn_devices_install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/scripts/ogn_devices_install.sh b/server/scripts/ogn_devices_install.sh index 6f65270..5859bc1 100755 --- a/server/scripts/ogn_devices_install.sh +++ b/server/scripts/ogn_devices_install.sh @@ -50,7 +50,7 @@ begin transaction; drop index if exists ogn_device_device_id_idx; truncate ogn_device; -copy ogn_device from '$SCRIPTPATH/ogndevices/$DATABASE/ogndevices2.csv' DELIMITERS ',' CSV QUOTE ''''; +\copy ogn_device from '$SCRIPTPATH/ogndevices/$DATABASE/ogndevices2.csv' DELIMITERS ',' CSV QUOTE ''''; create index ogn_device_device_id_idx on ogn_device(device_id); insert into ogn_device(device_type, device_id, aircraft_model, registration, cn, tracked, identified, ddb_aircraft_type) values ('F', '3FEF6F', '', '', '', 'N', 'N', 1); -- GitLab