Обсуждение: Windows: pg_dump doesn't recognize -n option

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

Windows: pg_dump doesn't recognize -n option

От
wstrzalka
Дата:
This is my output on Windows:
------------------------------------------------------------------------------------------------------------
D:\Code>pg_dump -U postgres -d test -n public
pg_dump: too many command-line arguments (first is "-n")
Try "pg_dump --help" for more information.

D:\Code>pg_dump -U postgres -d test --schema=public
pg_dump: too many command-line arguments (first is "--schema=public")
Try "pg_dump --help" for more information.

D:\Code>pg_dump --version
pg_dump (PostgreSQL) 8.3.3
---------------------------------------------------------------------------------------------------------

Re: Windows: pg_dump doesn't recognize -n option

От
Peter Eisentraut
Дата:
On Thursday 04 December 2008 13:03:16 wstrzalka wrote:
> This is my output on Windows:
> ---------------------------------------------------------------------------
>---------------------------------

> D:\Code>pg_dump -U postgres -d test -n public
> pg_dump: too many command-line arguments (first is "-n")
> Try "pg_dump --help" for more information.

The -d option doesn't take an argument.  (It does not mean database.)
Hence 'test' is the first non-option argument, and everything after that is
also interpreted as non-option argument (unless you use GNU getopt).

What you appear to want should be written as

pg_dump -U postgres -n public test

Re: Windows: pg_dump doesn't recognize -n option

От
wstrzalka
Дата:
Right. I mixed the input params.

The confusion comes from fact that I'm used to use Linux version which
never complained and worked as expected (besides the extra -d
parameter :D )


On 4 Gru, 13:50, pete...@gmx.net (Peter Eisentraut) wrote:
> On Thursday 04 December 2008 13:03:16 wstrzalka wrote:
>
> > This is my output on Windows:
> > -----------------------------------------------------------------------=
----
> >---------------------------------
> > D:\Code>pg_dump -U postgres -d test -n public
> > pg_dump: too many command-line arguments (first is "-n")
> > Try "pg_dump --help" for more information.
>
> The -d option doesn't take an argument. =A0(It does not mean database.) =
=A0
> Hence 'test' is the first non-option argument, and everything after that =
is
> also interpreted as non-option argument (unless you use GNU getopt).
>
> What you appear to want should be written as
>
> pg_dump -U postgres -n public test
>
> --
> Sent via pgsql-bugs mailing list (pgsql-b...@postgresql.org)
> To make changes to your subscription:http://www.postgresql.org/mailpref/p=
gsql-bugs