Re: [HACKERS] pg_restore -d doesn't display output - Mailing list pgsql-patches

From Bruce Momjian
Subject Re: [HACKERS] pg_restore -d doesn't display output
Date
Msg-id 200310081748.h98Hmht14044@candle.pha.pa.us
Whole thread Raw
In response to Re: [HACKERS] pg_restore -d doesn't display output  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-patches
Peter Eisentraut wrote:
> Bruce Momjian writes:
>
> > I have patched pg_restore to output the script contents if you restore
> > with -v:
>
> I don't think it's a good idea to overload the -v switch with it.  A
> separate switch seems OK, but I don't quite get the point of this
> functionality, actually.

Oh, OK.  When I was testing, I didn't realize that pg_restore doesn't do
anything unless you specify the database via -d, but I see it in the
docs now:

       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), similar to the ones created
       by the pg_dump plain text format. Some of the options con-
       trolling  the  script  output  are  therefore analogous to
       pg_dump options.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

pgsql-patches by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] pg_restore -d doesn't display output
Next
From: Robert Treat
Date:
Subject: akward wording in autovacuum README