Re: psql \copy

From: <paul(dot)malm(at)lfv(dot)se>
To: <pavel(dot)stehule(at)gmail(dot)com>
Cc: <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: psql \copy
Date: 2019-06-04 17:18:45
Message-ID: 0DD284A7-769D-4C5A-9AB3-52F914A10932@lfv.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thanx, it worked! :)

4 juni 2019 kl. 11:00 skrev Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com<mailto:pavel(dot)stehule(at)gmail(dot)com>>:

Hi

út 4. 6. 2019 v 10:50 odesílatel <paul(dot)malm(at)lfv(dot)se<mailto:paul(dot)malm(at)lfv(dot)se>> napsal:
Hi. I’m trying to execute this command:
C:\P_bin\psql -h 10.233.37.24 -p 5432 -U tester -d test -w -c "\copy public.BadenWuerttemberg_20181011 FROM C:\data\Baden-Wuerttemberg.csv' WITH DELIMITER ';' CSV"
Error: relation "public.badenwuerttemberg_20181011" does not exist.
What am I Doing wrong?

looks like case sensitive identifier is used. try

"\copy public.""BadenWuerttemberg_20181011"" ...

Regards

Pavel Stehule

There is a table (badenwuerttemberg_20181011) in database test under the public schema. The table has all the columns, with the right types, as the csv-file.
I’m using PostgreSQL 11
Kind regards,
Paul

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Matthias Apitz 2019-06-04 17:20:54 Re: Two small questions re/ COPY CSV data into table
Previous Message Andrew Gierth 2019-06-04 16:56:49 Re: Two small questions re/ COPY CSV data into table