| From: | "Matthew Nuzum" <cobalt(at)bearfruit(dot)org> | 
|---|---|
| To: | <pgsql-general(at)postgresql(dot)org> | 
| Subject: | selective copy | 
| Date: | 2003-02-27 13:58:14 | 
| Message-ID: | 00c301c2de68$460ff090$6900a8c0@mattspc | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-general | 
Hey group,
I know you can't do a selective copy but I was wondering if someone can
suggest the most effective way to get the same result.
What I have is a lot of text data with unknown characters. Quotes,
apostrophes, carriage returns and etc.  There could be hundreds or thousands
of rows in the table but I only want one or two.  I need to get the data
into an external file so it can be transported to another database and
re-inserted.
What I've done in the past is dump the table's data using pg_dump -t table
and using INSERTS instead of copy and then grep the results so that I only
get the desired line.  That only works when I'm using simple data that
doesn't wrap to different lines.
I'm doing this to restore data from a backup :`(
--
Matthew Nuzum
www.bearfruit.org
cobalt(at)bearfruit(dot)org
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Darko Prenosil | 2003-02-27 14:05:59 | Re: Function example returning more then 1 value | 
| Previous Message | Kolus Maximiliano | 2003-02-27 13:56:54 | Re: SETOF (was: Function example returning more then 1 |