From: | Dennis Gearon <gearond(at)cvc(dot)net> |
---|---|
To: | pgsql-general(at)postgresql(dot)org, "Matthew Nuzum" <cobalt(at)bearfruit(dot)org> |
Subject: | Re: selective copy |
Date: | 2003-02-27 16:39:36 |
Message-ID: | ZTSR848C9WA0HEJMK1V834XVQMUS.3e5e3f48@cal-lab |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Just create a table with a select from the bad table and then dump the filtered table.
2/27/2003 5:58:14 AM, "Matthew Nuzum" <cobalt(at)bearfruit(dot)org> wrote:
>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
>
>
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 4: Don't 'kill -9' the postmaster
>
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Stark | 2003-02-27 16:56:21 | non-{immutable, cacheable} function being treated as if they're immutable ? |
Previous Message | scott.marlowe | 2003-02-27 16:28:48 | Re: index usage (and foreign keys/triggers) |