It seems that pg_dump utility does not handle database name properly with equal to (=) sign in it.
Observe above stack trace, we are generating command line command properly. However pg_dump only takes database name upto equal to sign reset is ignored.
e.g. Database name in command is "!#$%^&*()_+{}|:\"<>?=-\\][';/.," but in pg_dump error it says failed: invalid connection option "!#$%^&*()_+{}|:"<>?"
For more information, 'getopt_long' function used in pg_dump returns only the second value, when we pass the above value properly.
Can we get the information on how to escape '=' (equal sign) with getopt_long(..) function?