[eluser]dathan[/eluser]
The connection logic in db_connect and db_pconnect doesn't give a lot of flexibility in terms of creating the connection string. So I modified it to only use whichever DB connection parameters the user actually supplied to create the connection string (motivated by my server config, in which I just have to give the dbname parameter and the apache account is authenticated by the system with no additional credentials). I've only tested it with database settings set in the application/config/database.php file.
Here's a unified DIFF of the database/drivers/postgre/postgre_driver.php file:
-----===== Removed for brevity. See next post for updated version. =====-----