Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: Restore single table from pg_dumpall.



> 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




Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group