mirror of
https://github.com/postgres/postgres.git
synced 2025-06-25 01:02:05 +03:00
libpq: have PQconnectdbParams() and PQpingParams accept "" as default
Previously, these functions treated "" optin values as defaults in some ways, but not in others, like when comparing to .pgpass. Also, add documentation to clarify that now "" and NULL use defaults, like PQsetdbLogin() has always done. BACKWARD INCOMPATIBILITY Patch by Adrian Vondendriesch, docs by me Report by Jeff Janes
This commit is contained in:
@ -4357,7 +4357,7 @@ conninfo_array_parse(const char *const * keywords, const char *const * values,
|
||||
const char *pname = keywords[i];
|
||||
const char *pvalue = values[i];
|
||||
|
||||
if (pvalue != NULL)
|
||||
if (pvalue != NULL && pvalue[0] != '\0')
|
||||
{
|
||||
/* Search for the param record */
|
||||
for (option = options; option->keyword != NULL; option++)
|
||||
|
Reference in New Issue
Block a user