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

Re: ECPG and COPY TO STDOUT

From: Michael Meskes <meskes(at)postgresql(dot)org>
To: Edmund Bacon <ebacon(at)onesystem(dot)com>
Cc: pgsql-interfaces <pgsql-interfaces(at)postgresql(dot)org>
Subject: Re: ECPG and COPY TO STDOUT
Date: 2004-04-03 16:27:35
Message-ID: 20040403162735.GA8682@1 (view raw or flat)
Thread:
Lists: pgsql-interfaces
On Thu, Apr 01, 2004 at 12:22:44PM -0700, Edmund Bacon wrote:
> If I use COPY TO STDOUT in an ECPG program, where does the output go?

Nowhere, it's discarded.

> What I'm trying to do is to dump a table's data, and have the resulting
> file owned by the application user rather than the dba user.

ecpg gets PGRES_COPY_OUT as a result from the execution and just calls
PQendcopy() without reading the data. The same happens btw with
PGRES_COPY_IN. It's working like this since the get-go in the sources I
inherited from Linux Tolke. I guess we could add this to the todo list
as a feature request.

Patches are welcome of course. :-)

Michael
-- 
Michael Meskes
Email: Michael at Fam-Meskes dot De
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes(at)jabber(dot)org
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!

In response to

pgsql-interfaces by date

Next:From: Jason E. StewartDate: 2004-04-04 15:42:23
Subject: View permissions
Previous:From: Adriaan JoubertDate: 2004-04-03 05:35:45
Subject: Bug in translation of DEALLOCATE PREPARE

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