selective export for subsequent import (COPY) - Mailing list pgsql-general

From chrisj
Subject selective export for subsequent import (COPY)
Date
Msg-id 10071704.post@talk.nabble.com
Whole thread Raw
Responses Re: selective export for subsequent import (COPY)  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
Re: selective export for subsequent import (COPY)  ("Harvey, Allan AC" <HarveyA@OneSteel.com>)
Re: selective export for subsequent import (COPY)  (Brent Wood <b.wood@niwa.co.nz>)
List pgsql-general
I would like to do a selective export of a number of tables from a large
database to import into a smaller (test) DB.

I know about: psql dbname -tc "select * from tableX where whatever" >
tableX.dat

but unless I put it through a sed script, this file cannot be easily used
for import.

It feels like I am re-inventing the wheel.  Does anybody know a better way
or have a good sed script.

--
View this message in context:
http://www.nabble.com/selective-export-for-subsequent-import-%28COPY%29-tf3604927.html#a10071704
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


pgsql-general by date:

Previous
From: "A. Kretschmer"
Date:
Subject: Re: Login to Postgres 8.2 via Cygwin hangs
Next
From: "A. Kretschmer"
Date:
Subject: Re: selective export for subsequent import (COPY)