Re: db partial dumping with pg_dump - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: db partial dumping with pg_dump
Date
Msg-id 200208131903.g7DJ3Lu16950@candle.pha.pa.us
Whole thread Raw
In response to Re: db partial dumping with pg_dump  (Hannu Krosing <hannu@tm.ee>)
Responses Re: db partial dumping with pg_dump  (Hannu Krosing <hannu@tm.ee>)
List pgsql-hackers
Actually, loading all this stuff into COPY is not the way to go, I
think.  

Informix had:
UNLOAD TO 'filename'SELECT ...

I have to admit, this is a superior way to do thing compared to what we
have.  Is is possible for us to get:
COPY TO 'filename'SELECT ...

It allows any arbitrary table, group by, even order by combination.


---------------------------------------------------------------------------

Hannu Krosing wrote:
> On Tue, 2002-08-13 at 20:24, Tom Lane wrote:
> > 
> > What would seem to make sense is adding a WHERE-clause option to
> > COPY TO, and then you could go
> >     COPY table TO 'myfile' WHERE ...
> 
> What about :
> 
> COPY table TO 'myfile' [ WHERE cond ] [ AS INSERT [ WITH COLUMN ] ];
> 
> to get the data as INSERT INTO statements (pg_dump -d), with optional
> column list (pg_dump -D)
> 
> ----------------
> Hannu
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
> 

--  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,
Pennsylvania19073
 


pgsql-hackers by date:

Previous
From: Hannu Krosing
Date:
Subject: Re: db partial dumping with pg_dump
Next
From: Rod Taylor
Date:
Subject: Re: Temporary Views