How can i dump a password-protected database using perl (DBI or pg) or C (using libpq)? I can't pass the password to pg_dump utility (I was trying to pass it via tty also) when running system() from perl.