pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Naomi Walker <nwalker@eldocomp.com>
To: Bruce Momjian <pgman@candle.pha.pa.us>
To: Naomi Walker <nwalker@eldocomp.com>
Cc: Bhuvan A <bhuvansql@myrealbox.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: loading and unloading rows
Date: Sat, 02 Nov 2002 13:44:11 -0700
Message-ID: <5.1.0.14.2.20021102133720.00a24250@imap.eldocomp.com> (raw)
In-Reply-To: <200211020339.gA23dsL09383@candle.pha.pa.us>
References: <4.2.2.20021101165030.01dcbc70@imap.eldocomp.com>

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.
> >




view thread (9+ messages)  latest in thread

Message-ID: <5.1.0.14.2.20021102133720.00a24250@imap.eldocomp.com>
Permalink:  ../5.1.0.14.2.20021102133720.00a24250@imap.eldocomp.com/
Also on:    postgresql.org/message-id/5.1.0.14.2.20021102133720.00a24250@imap.eldocomp.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: nwalker@eldocomp.com, pgman@candle.pha.pa.us, bhuvansql@myrealbox.com
  Subject: Re: loading and unloading rows
  In-Reply-To: <5.1.0.14.2.20021102133720.00a24250@imap.eldocomp.com>
  References: <4.2.2.20021101165030.01dcbc70@imap.eldocomp.com> <5.1.0.14.2.20021102133720.00a24250@imap.eldocomp.com>

* 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