Robert Haas <rhaas(at)postgresql(dot)org> writes:
> Remove ancient -X options to pg_dump, pg_dumpall, pg_restore.
> The last version in which these options were documented is now EOL, so
> it's time to get rid of them for real. We now use GNU-style long
> options instead.
It looks like you forgot to remove 'X:' from the getopt calls.
regards, tom lane