selective export for subsequent import (COPY)

From: chrisj <chrisj(dot)wood(at)sympatico(dot)ca>
To: pgsql-general(at)postgresql(dot)org
Subject: selective export for subsequent import (COPY)
Date: 2007-04-19 04:59:35
Message-ID: 10071704.post@talk.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message A. Kretschmer 2007-04-19 05:01:40 Re: Login to Postgres 8.2 via Cygwin hangs
Previous Message Sergei Dubov 2007-04-19 03:25:07 Login to Postgres 8.2 via Cygwin hangs