postgresqlpgadmin-4

SQL state: 42601 Error in PostgreSQL when creating a table


Edited: I was trying to create a table within PostgreSql server but got an error.

ERROR:  syntax error at or near "\"
LINE 40: \COPY public.fy24pcard 
         ^ 

SQL state: 42601
Character: 812

and the query looks like this:

\COPY public.fy24pcard 
FROM 'C:\Users\Omitted.csv' 
WITH DELIMITER ',' CSV HEADER

Can someone help me with this?

I tried importing the file using IMPORT but failed.


Solution

  • \COPY is a command for the psql client, not for pgadmin. Remove the \