PostgreSQL import CSV File causes Syntax Error
\copy is a psql (commandline) command. It is not a regular SQL command. 

You will need to use COPY instead (but that requires the file to be present on the database server)