pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Meskes <meskes@postgresql.org>
To: Edmund Bacon <ebacon@onesystem.com>
Cc: pgsql-interfaces <pgsql-interfaces@postgresql.org>
Subject: Re: ECPG and COPY TO STDOUT
Date: Sat, 3 Apr 2004 18:27:35 +0200
Message-ID: <20040403162735.GA8682@1> (raw)
In-Reply-To: <1080847364.13873.14.camel@elb_lx.onesystem.ca>
References: <1080847364.13873.14.camel@elb_lx.onesystem.ca>

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@jabber.org
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!



view thread (2+ messages)

Message-ID: <20040403162735.GA8682@1>
Permalink:  ../20040403162735.GA8682@1/
Also on:    postgresql.org/message-id/20040403162735.GA8682@1

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: meskes@postgresql.org, ebacon@onesystem.com
  Subject: Re: ECPG and COPY TO STDOUT
  In-Reply-To: <20040403162735.GA8682@1>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox