Reputation: 33
I have postgres version 9.5 i want to execute PROGRAM clause of Postgres COPY command with Powershell command to import csv data into table
i try to execute following command in postgres 9.5 COPY [table name] FROM PROGRAM 'powershell -command { Get-Content "file path " | Select -skip 1}' WITH DELIMITER ',' CSV HEADER ;
Error:- DETAIL: child process exited with exit code 255
please help us thank you
Upvotes: 1
Views: 770
Reputation: 33
Just i need to remove "{" "}" and it is working correctly Query is follow below COPY [table name] FROM PROGRAM 'powershell -command Get-Content "file path " | Select -skip 1' WITH DELIMITER ',' CSV HEADER ;
Upvotes: 0