Re: TR: Re: TR: interface PERL and return results
От | Jean-Luc Lachance |
---|---|
Тема | Re: TR: Re: TR: interface PERL and return results |
Дата | |
Msg-id | 3DA6E0D6.B0DD3486@nsd.ca обсуждение исходный текст |
Ответ на | TR: Re: TR: interface PERL and return results ("victor3.lopes@voila.fr" <victor3.lopes@voila.fr>) |
Список | pgsql-interfaces |
Two things: The file MUST be on the server where PostgreSQL is running. The file MUST be accessible by the user postgres. rmunn@pobox.com wrote: > > On Fri, Oct 11, 2002 at 12:29:40AM +0200, victor3.lopes@voila.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 > work. > > -- > Robin Munn > rmunn@pobox.com > > ------------------------------------------------------------------------ > Part 1.2Type: application/pgp-signature
В списке pgsql-interfaces по дате отправления: