Skip site navigation (1) Skip section navigation (2)

Re: TR: Re: TR: interface PERL and return results

From: rmunn(at)pobox(dot)com
To: "victor3(dot)lopes(at)voila(dot)fr" <victor3(dot)lopes(at)voila(dot)fr>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: TR: Re: TR: interface PERL and return results
Date: 2002-10-11 05:56:54
Message-ID: 20021011055654.GA32131@rmunnlfs (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces
On Fri, Oct 11, 2002 at 12:29:40AM +0200, victor3(dot)lopes(at)voila(dot)fr wrote:
> Hello, anyone have a response of  my problem ?

Maybe. See below...
> I have try two methods for charge my result.res in my table.
> the first  method :
> $res = $db->exec(" COPY temp FROM "full path\result.res ");
> Unfortunately I did not succeed in using this method, I had always an
> error ( While placing postgres in debug mode ).
> DEBUG:  StartTransactionCommand
> DEBUG:  query: COPY temp FROM '-- my path -- /result.res'
> DEBUG:  parse tree: { QUERY :command 5  :utility ?  :resultRelation 0 :into <>
> :isPortal false :isBinary false :isTemp false :hasAggs false :hasSubLinks false :rtable
> <> :jointree <> :rowMarks () :targetList <> :groupClause <> :havingQual <>
> :distinctClause <> :sortClause <> :limitOffset <> :limitCount <> :setOperations <>
> :resultRelations ()}
> DEBUG:  ProcessUtility: COPY temp FROM '-- my path -- /result.res'
> ERROR:  You must have Postgres superuser privilege to do a COPY directly to or from a
> file.  Anyone can COPY to stdout or from stdin.  Psql's \copy command also works for
> anyone.
> ....
> I don't understand why this error because the superuser postgres (who had create for
> launch the server) have the privilege
> for access and read this file.

In your Perl script, what user and password did you use to connect to
the database? You need to *connect* as the Postgres superuser (which is
almost always the user named 'postgres').

If you are connected as user postgres then your COPY command should

Robin Munn

In response to


pgsql-interfaces by date

Next:From: victor3.lopesDate: 2002-10-11 08:34:43
Subject: Re: TR: Re: TR: interface PERL and return results
Previous:From: Tom LaneDate: 2002-10-11 04:16:59
Subject: Re: Minimum permissions required for pg_dump as a backup user

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group