Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id BAE33475A71 for ; Sat, 2 Nov 2002 15:44:29 -0500 (EST) Received: from hawk.mail.pas.earthlink.net (hawk.mail.pas.earthlink.net [207.217.120.22]) by postgresql.org (Postfix) with ESMTP id 4C65247595A for ; Sat, 2 Nov 2002 15:44:29 -0500 (EST) Received: from sdn-ap-011caburbp0327.dialsprint.net ([63.184.105.73] helo=naomi.eldocomp.com) by hawk.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 18857y-0006WQ-00; Sat, 02 Nov 2002 12:44:19 -0800 Message-Id: <5.1.0.14.2.20021102133720.00a24250@imap.eldocomp.com> X-Sender: nwalke@imap.eldocomp.com (Unverified) X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Sat, 02 Nov 2002 13:44:11 -0700 To: Bruce Momjian , Naomi Walker From: Naomi Walker Subject: Re: loading and unloading rows Cc: Bhuvan A , pgsql-admin@postgresql.org In-Reply-To: <200211020339.gA23dsL09383@candle.pha.pa.us> References: <4.2.2.20021101165030.01dcbc70@imap.eldocomp.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/36 X-Sequence-Number: 6224 Exactly. My Informix background is showing. Is there a way to officially get this put on a to do list? I'd be most appreciative of the value this adds. Slightly off subject, is there a way to read from one cluster and insert into a database in another cluster (local or remote)? I think I read this is coming in the future. In Informix-land, we used to do this through a named pipe. It was quite handy. At 10:39 PM 11/1/02 -0500, Bruce Momjian wrote: >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; > >It is tough to beat this flexibility. > >--------------------------------------------------------------------------- > >Naomi Walker wrote: > > > > > The problem with COPY, I think, is that I cannot use a WHERE > > statement. I'd like to just unload certain rows from a table. If I > wanted > > the whole table, i'll do a pg_dump or copy. > > > > > Again, i'd like a way to easily unload some selected rows (select * table > > where foo=X) from a table, and save them, or load them in another cluster, > > etc. Short of writing them to a temp table, then pg_dumping, or some > > klunk-oid mething, I do not see a clean way. > > > > Back to the maddening crowd. Anyone at least agreed this is > needed? Could > > we add "where" clauses to COPY? That would be perfect. > >