Обсуждение: pg_restore -d doesn't display output

Поиск
Список
Период
Сортировка

pg_restore -d doesn't display output

От
Bruce Momjian
Дата:
Does anyone know why 'pg_restore -d' doesn't display the commands being
executed, like you see when you don't use '-d':
pg_dump -Fc test >/tmp/test.dbpg_restore < /tmp/test.dbpg_restore -d test < /tmp/test.db

The first pg_restore displays the commands, while the second does not.

--  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,
Pennsylvania19073
 


Re: pg_restore -d doesn't display output

От
Tom Lane
Дата:
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Does anyone know why 'pg_restore -d' doesn't display the commands being
> executed, like you see when you don't use '-d':

>     pg_restore < /tmp/test.db
>     pg_restore -d test < /tmp/test.db

The first sends a script to stdout (effectively equivalent to pg_dump
plain style).  The second sends the commands to a backend.

I would have expected there to be a --verbose option that would also echo
the commands to stderr, but it doesn't look like there's any support for
that in the code.
        regards, tom lane


Re: pg_restore -d doesn't display output

От
Bruce Momjian
Дата:
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > Does anyone know why 'pg_restore -d' doesn't display the commands being
> > executed, like you see when you don't use '-d':
> 
> >     pg_restore < /tmp/test.db
> >     pg_restore -d test < /tmp/test.db
> 
> The first sends a script to stdout (effectively equivalent to pg_dump
> plain style).  The second sends the commands to a backend.
> 
> I would have expected there to be a --verbose option that would also echo
> the commands to stderr, but it doesn't look like there's any support for
> that in the code.

I don't understand why sending something to a backend should effect the
script output.

--  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,
Pennsylvania19073