Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 31D6F47623E for ; Thu, 7 Nov 2002 23:46:30 -0500 (EST) Received: from candle.pha.pa.us (momjian.navpoint.com [207.106.42.251]) by postgresql.org (Postfix) with ESMTP id 9E8A8475A71 for ; Thu, 7 Nov 2002 23:46:28 -0500 (EST) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.10.1) id gA84kOw29553; Thu, 7 Nov 2002 23:46:24 -0500 (EST) From: Bruce Momjian Message-Id: <200211080446.gA84kOw29553@candle.pha.pa.us> Subject: Re: loading and unloading rows In-Reply-To: <5.1.0.14.2.20021103164103.00a09070@imap.eldocomp.com> To: Naomi Walker Date: Thu, 7 Nov 2002 23:46:23 -0500 (EST) Cc: Bhuvan A , pgsql-admin@postgresql.org X-Mailer: ELM [version 2.4ME+ PL99 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/95 X-Sequence-Number: 6283 Naomi Walker wrote: > Can we add unload/load functionality to the list, please? > > > > > > >Yes, agreed, it would be nice to have WHERE as part of COPY. In fact, I > > > >like Informix's solution, which merges data in/out with INSERT/SELECT: > > > > > > > > UNLOAD TO '/tmp/x' > > > > SELECT * > > > > FROM tab; > > > > > > > >and > > > > > > > > LOAD FROM '/tmp/x' > > > > INSERT INTO tab; I have thought of that. We would probably join COPY to INSERT/SELECT rather than use LOAD/UNLOAD. The problem is that the COPY code reads right out of the table, rather than reading from the executor. This change would require that. You can do it now by using TEMP tables to do the COPY. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073