Re: usage of copy command in pgsql

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: rama krishna <arkr505(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: usage of copy command in pgsql
Date: 2006-02-16 11:55:46
Message-ID: 20060216115546.GC26127@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)svana(dot)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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message A. Kretschmer 2006-02-16 11:56:28 Re: usage of copy command in pgsql
Previous Message rama krishna 2006-02-16 11:43:22 usage of copy command in pgsql