On Wednesday 23 June 2010 4:12:40 am Raymond O'Donnell wrote:
> On 23/06/2010 04:52, Janet Jacobsen wrote:
> > Hi.  What is the best way to check a pgdump
> > without doing a restore?
>
> If you used one of the binary formats for pg_dump, you can have
> pg_restore list the contents without actually restoring the database.

http://www.postgresql.org/docs/8.3/interactive/app-pgrestore.html

To add, pg_restore has an -f switch that allows you to restore a binary dump to 
a file. To quote from above:

"pg_restore can operate in two modes. If a database name is specified, the 
archive is restored directly into the database. Otherwise, a script containing 
the SQL commands necessary to rebuild the database is created and written to a 
file or standard output. The script output is equivalent to the plain text 
output format of pg_dump. Some of the options controlling the output are 
therefore analogous to pg_dump options. "


This is quite handy as allows you store dumps in the compressed binary format 
and retrieve specific information as needed in a human readable form.

>
> If you did a text dump, just look into the file. :-)
>
> Ray.
>
> --
> Raymond O'Donnell :: Galway :: Ireland
> r...@iol.ie



-- 
Adrian Klaver
adrian.kla...@gmail.com

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to