I am having an issue trying to run \copy command where my column name is desc
I've tried the following:
psql -U user -p 1234 -h hostname -c "\copy schema.table (desc) from /my/file.txt WITH DELIMITER '|' HEADER CSV " db
psql -U user -p 1234 -h hostname -c "\copy schema.table ('desc') from /my/file.txt WITH DELIMITER '|' HEADER CSV " db
psql -U user -p 1234 -h hostname -c "\copy schema.table ("desc") from /my/file.txt WITH DELIMITER '|' HEADER CSV db
I get the same error everytime:
ERROR: syntax error at or near "desc"
I can't seem to get around it. Is there something that I am missing?