Hi,

I noticed that the pg_dump and pg_basebackup are not erroring out when
"--fo"/"--for"/"--form"/"--forma"/" are specified(use cases 1 - 4, 7 -
9) whereas it fails if a pattern that doesn't match with "format" is
specified (use case 5, 10). This seems to be true only for "--format"
option, for other options it just errors out (use case 6). Why is the
behaviour for "--format" isn't consistent?

Is it something expected? Is the option parsing logic here buggy?

Thoughts?

Use cases:
1) ./pg_dump --dbname=postgres --host=localhost --port=5432
--username=bharath --no-password --fo=plain --file=mydump.sql
2) ./pg_dump --dbname=postgres --host=localhost --port=5432
--username=bharath --no-password --for=plain --file=mydump.sql
3) ./pg_dump --dbname=postgres --host=localhost --port=5432
--username=bharath --no-password --form=plain --file=mydump.sql
4) ./pg_dump --dbname=postgres --host=localhost --port=5432
--username=bharath --no-password --forma=plain --file=mydump.sql
5) ./pg_dump --dbname=postgres --host=localhost --port=5432
--username=bharath --no-password --foo=plain --file=mydump.sql
6) ./pg_dump --dbname=postgres --host=localhost --port=5432
--username=bharath --no-password --format=plain --fi=mydump.sql
7) ./pg_basebackup -D bkupdata --fo=plain
8) ./pg_basebackup -D bkupdata --for=plain
9) ./pg_basebackup -D bkupdata --forma=plain
10) ./pg_basebackup -D bkupdata --foo=plain

Regards,
Bharath Rupireddy.


Reply via email to