So I have this script that i need to execute from a Java web application. The file containing this lines is located under WEB-INF
truncate table amm.mm_dosage_unit;
alter table amm.mm_dosage_unit add column code_new_version character varying(1);
copy amm.mm_dosage_unit FROM 'code_list.csv' DELIMITER ',' CSV;
I use reader to execute each of the lines.
Problem is that I dont know how to scpecifie the correct path for my .csv file and i get No such file or directory
error.
Any ideas
COPY
command (not the\copy
command from psql), it is looking for files on the server that runs PostgreSQL, not on the client side. Is your web application running on the same machine as PostgreSQL? – RealSkeptic yesterday