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

Re: Dump/restore with bad data and large objects

From: Joshua Drake <jd(at)commandprompt(dot)com>
To: "John T(dot) Dow" <john(at)johntdow(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Dump/restore with bad data and large objects
Date: 2008-08-25 17:47:11
Message-ID: 20080825104711.2ddfafd9@jd-laptop (view raw, whole thread or download thread mbox)
Lists: pgsql-general
On Mon, 25 Aug 2008 13:37:13 -0400
"John T. Dow" <john(at)johntdow(dot)com> wrote:

> Joshua
> The TOC feature sounds good, as does converting a single table to
> plain text.
> But I can't find documentation for the TOC feature under pg_dump or
> pg_restore. I'm looking in postgresql-8.2.1-US.pdf.

The commands you are looking for are:

pg_restore -l to get the toc
pg_restore -L to use the toc

If you open the resulting file from something like pg_restore -l >
foo.toc it is just a plain text list of objects to restore.

I don't know how well it is documented but I am sure we would accept a

> Neither could I see anything about converting a single table to a
> plain text dump.

pg_restore allows you to do so. Something like:

pg_restore foo.sqlc --file=foo.sql

> Also, I stumbled across the statement that you can't restore large
> objects for a single table. Is that true?

Large objects are stored in a central table called pg_largeobject, so
yes that would be accuarate.

> Another thing I couldn't find was how to dump roles using -Fc.

You can't; that is a known and irritating limitation.


Joshua D. Drake

The PostgreSQL Company since 1997: 
PostgreSQL Community Conference:
United States PostgreSQL Association:
Donate to the PostgreSQL Project:

In response to


pgsql-general by date

Next:From: Tino WildenhainDate: 2008-08-25 18:06:21
Subject: Re: just work installation & configuration
Previous:From: John T. DowDate: 2008-08-25 17:37:13
Subject: Re: Dump/restore with bad data and large objects

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group