Hi, Attached is a patch (against CVS HEAD) to the pgsql libdbi driver that addresses two bugs in how the conninfo string was constructed
1. Characters were not being escaped properly, so if you had a backslash or apostrophe in one of the parameter strings (e.g. username, password, etc.) it would lead to an invalid conninfo string being sent to PQconnectdb(). The PostgreSQL documentation for PQconnectdb() specifies that "Single quotes and backslashes within the value must be escaped with a backslash, i.e., \'and \\." 2. There was no way to completely omit values from the conninfo string. The conninfo_kludge variable took care of omitting "host" and "port" if they were not specified, but the same was not done for "user" -- so there was no way to tell libpq to use the default user name. In this patch, I've made all parameters optional, so all NULL parameter values are actually omitted from the conninfo string, rather than making NULL equivalent to an empty string. Let me know what you think. I haven't subscribed to the libdbi-drivers-devel mailing list, so please reply to me directly (afn AT stanford DOT edu). Cheers, Tony Novak
pgsql.patch
Description: Binary data
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________ Libdbi-drivers-devel mailing list Libdbi-drivers-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel