X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 35521D1EC95 for ; Sat, 3 Apr 2004 16:27:27 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 82546-03 for ; Sat, 3 Apr 2004 12:27:38 -0400 (AST) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.177]) by svr1.postgresql.org (Postfix) with ESMTP id 86B6FD1EBB0 for ; Sat, 3 Apr 2004 12:27:23 -0400 (AST) Received: from [212.227.126.209] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1B9nzd-0002KX-00; Sat, 03 Apr 2004 18:27:37 +0200 Received: from [80.142.173.87] (helo=fam-meskes.de) by mrelayng.kundenserver.de with asmtp (Exim 3.35 #1) id 1B9nzd-0002Hq-00; Sat, 03 Apr 2004 18:27:37 +0200 Received: from feivel (feivel.fam-meskes.de [172.26.14.14]) by fam-meskes.de (Postfix) with ESMTP id 16EDE10EF7D; Sat, 3 Apr 2004 18:27:45 +0200 (CEST) Received: by feivel (Postfix, from userid 1000) id 088534AAE9; Sat, 3 Apr 2004 18:27:35 +0200 (CEST) Date: Sat, 3 Apr 2004 18:27:35 +0200 From: Michael Meskes To: Edmund Bacon Cc: pgsql-interfaces Subject: Re: ECPG and COPY TO STDOUT Message-ID: <20040403162735.GA8682@1> Mail-Followup-To: Edmund Bacon , pgsql-interfaces References: <1080847364.13873.14.camel@elb_lx.onesystem.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1080847364.13873.14.camel@elb_lx.onesystem.ca> User-Agent: Mutt/1.5.5.1+cvs20040105i X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:da5cff6069dd6897c77170232368d0ba X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200404/5 X-Sequence-Number: 4826 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!