Skip to content
Advertisement

Using PostgreSQL COPY

I’m using JMeter for insert summary data file to PostgreSQL.

I tried copy instead of COPY but I’m getting error at copy syntax.

I found out COPY is for only server-side, so I us copy for client-side.

Here is my query

copy Load(label,success,bytes,latency)
FROM '/Desktop/Summary/oca_sum.csv' DELIMITER ',' CSV HEADER;

Here is the error:

org.postgresql.util.PSQLException: ERROR: syntax error at or near “” at position: 1

Advertisement

Answer

copy is not a SQL command but a psql command: you need to use psql.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement