Received: from anchor-post-34.mail.demon.net (anchor-post-34.mail.demon.net [194.217.242.92]) by postgresql.org (8.11.3/8.11.1) with ESMTP id f6693Ja46395 for ; Fri, 6 Jul 2001 05:03:20 -0400 (EDT) (envelope-from dev@archonet.com) Received: from mwynhau.demon.co.uk ([193.237.186.96] helo=mainbox.archonet.com) by anchor-post-34.mail.demon.net with esmtp (Exim 2.12 #1) id 15IRVH-0001EH-0Y; Fri, 6 Jul 2001 10:02:23 +0100 Received: from client (client.archonet.com [192.168.1.16]) by mainbox.archonet.com (Postfix) with SMTP id 8DD5D13E09; Fri, 6 Jul 2001 09:41:07 +0100 (BST) Message-ID: <003e01c105f7$66043fa0$1001a8c0@archonet.com> From: "Richard Huxton" To: "Bhuvan A" , References: Subject: Re: While Using COPY COMMAND ... Date: Fri, 6 Jul 2001 09:41:04 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Archive-Number: 200107/56 X-Sequence-Number: 3837 From: "Bhuvan A" > hello sirs,, > > I am using PSQL client. I can able to copy the contents of a > table to '/tmp/' directory. But Why can't i able to copy > contents of a table to my home directory? > > But, i can redirect the output of a command (\o) to a file > in my home directory.. How it gets succeed while the prev. > doesn't???? > > For your clarifications, here is the workflow. > > > bhuvan=# copy f_addr_phones with oids to > '/home/bhuvan/fap-table'; > ERROR: COPY command, running in backend with effective uid > 1015, could not open file '/home/bhuvan/fap-table' for The "copy" command runs in the backend as user postgres (uid 1015) who quite rightly doesn't have access to your home directory Look into \copy instead - that acts from the client, so has your permissions. HTH - Richard Huxton