Patrick Nelson <pnelson(at)neatech(dot)com> writes:
> -username and -password are not options of pg_connect and result in an
> error. That's the problem there seems to be no way of specifying a specific
> user.
Use the pg_connect -conninfo style, -conninfo "user=foo dbname=bar ..."
The other syntax is obsolete and not really being supported.
regards, tom lane