Re: Restore single table from pg_dumpall.

From: Alan Hodgson <ahodgson(at)simkin(dot)ca>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Restore single table from pg_dumpall.
Date: 2007-01-22 23:53:08
Message-ID: 200701221553.08503@hal.medialogik.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

> On 1/23/07, Jim Stalewski <JStalewski(at)visalighting(dot)com> wrote:
> > I have been asked by a programmer to restore a single table from a
> > PG_DUMPALL backup.
> >
> > Is this possible, and if so, would anyone be able to tell me please,
> > what PSQL options and switches are required? Running PostgreSQL 8.1.3.

This is a lot simpler with a tar or custom format backup from pg_dump.
Using that, you could dump the ToC and modify it to select the table you
want to restore.

With a pg_dumpall backup you might just be better off restoring the whole
thing into an empty cluster, and then dump the one table only from there.
Unless it's small enough to load into a text editor, of course.

--
"A government that robs Peter to pay Paul can always depend upon the support
of Paul." - George Bernard Shaw

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Duncan Garland 2007-01-23 11:13:56 Re: [SPAM] Restore single table from pg_dumpall.
Previous Message Andrej Ricnik-Bay 2007-01-22 23:48:04 Re: Restore single table from pg_dumpall.