Hello there!
I've been trying to import data from csv file to remote postgre database with no luck. Locally i can do it with simple COPY query, but that only works because i'm superuser. \COPY command also works when i run it in psql. So the question is: how can i do it in PHP? Is there function that runs psql commands?
Query example:
COPY table1(field1, field2, field3)
FROM '/filepath/data.csv'
WITH DELIMITER ';'
CSV HEADER;
\copy table1(field1, field2, field3)
FROM '/filepath/data.csv'
WITH DELIMITER ';'
CSV HEADER