Re: COPY command error in psql. - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: COPY command error in psql.
Date
Msg-id 20020409235121.D7955@svana.org
Whole thread Raw
In response to COPY command error in psql.  (Matthew Stanfield <matthew@propertyknowledge.com>)
List pgsql-general
On Tue, Apr 09, 2002 at 02:39:22PM +0100, Matthew Stanfield wrote:
> Hi,
>
> I'm trying to import tables in psql but am getting a permission denied
> error. I'm using the '\i file' command as I intend to import 100+ tables
> and want to set this up to run overnight (almost 1 GB of data is going in).
>
> My test for this is not working. I have a 'batch' file the contents of
> which are (at the moment) only:
>
> COPY ab FROM '/home/ms/db/csv/AB.csv'
>
> Table 'ab' exists as does the csv file and I am logged in as 'postgres'.

You want \copy. COPY asks the backend to do it, which may not have
permission, as you noticed.
--
Martijn van Oosterhout <kleptog@svana.org>   http://svana.org/kleptog/
> Ignorance continues to thrive when intelligent people choose to do
> nothing.  Speaking out against censorship and ignorance is the imperative
> of all intelligent people.

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: COPY command error in psql.
Next
From: Jean-Michel POURE
Date:
Subject: Re: PostgreSQL and C#