pg_dump: too many command line arguments

Bhargav Gor picture Bhargav Gor · Aug 8, 2012 · Viewed 37.9k times · Source

what is wrong with this command:

pg_dump -U postgres -W admin --disable-triggers -a -t employees -f D:\ddd.txt postgres

This is giving error of too many command-line arguments

Answer

Jim picture Jim · Aug 8, 2012

Looks like its the -W option. There is no value to go with that option.

-W, --password           force password prompt (should happen automatically)

If you want to run the command without typing is a password, use a .pgpass file. http://www.postgresql.org/docs/9.1/static/libpq-pgpass.html