Re: Restore 1 Table from pg_dumpall?

From: Jasen Betts <jasen(at)xnet(dot)co(dot)nz>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Restore 1 Table from pg_dumpall?
Date: 2013-01-27 09:25:55
Message-ID: ke2rr3$opo$1@gonzo.reversiblemaps.ath.cx
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 2013-01-22, Rich Shepard <rshepard(at)appl-ecosys(dot)com> wrote:
> I neglected to dump a single table before adding additional rows to it via
> psql. Naturally, I messed up the table. I have a full pg_dumpall of all
> three databases and all their tables in a single .sql file from 2 days ago.
> The file is 386M in size and emacs is taking a very long time to move around
> in it.

yeah, emacs is slow on large files.

for a one-off I'd use less(1), to extract the desired table data.

If I had to repeat it i'd use sed or awk

--
⚂⚃ 100% natural

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jasen Betts 2013-01-27 10:04:41 Re: Running update in chunks?
Previous Message Jasen Betts 2013-01-27 08:33:17 Re: Cast double precision to integer & check for overflow