Re: usage of copy command in pgsql - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: usage of copy command in pgsql
Date
Msg-id 20060216115546.GC26127@svana.org
Whole thread Raw
In response to usage of copy command in pgsql  (rama krishna <arkr505@gmail.com>)
List pgsql-general
On Thu, Feb 16, 2006 at 05:13:22PM +0530, rama krishna wrote:
> I have to copy the  file to a table data base
>   the command used for this is COPY
>                    But it showing the error like no permission is granted to
> read the file.
>    for this i gave 777 permissions to that file even the same err repeated.
>     What to do for this

You don't say which OS or version of postgres. However, COPY from
arbitrary file is limited to superusers and even then, it must be
readable to the backend (including all parent directories.

Perhaps what you're looking for is \copy which work for clients and
doesn't require special permissions.
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Attachment

pgsql-general by date:

Previous
From: rama krishna
Date:
Subject: usage of copy command in pgsql
Next
From: "A. Kretschmer"
Date:
Subject: Re: usage of copy command in pgsql