Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit13ecb82

Browse files
committed
libpq: have PQconnectdbParams() and PQpingParams accept "" as default
Previously, these functions treated "" optin values as defaults in someways, but not in others, like when comparing to .pgpass. Also, adddocumentation to clarify that now "" and NULL use defaults, likePQsetdbLogin() has always done.BACKWARD INCOMPATIBILITYPatch by Adrian Vondendriesch, docs by meReport by Jeff Janes
1 parent66b1084 commit13ecb82

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

‎doc/src/sgml/libpq.sgml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -131,15 +131,15 @@ PGconn *PQconnectdbParams(const char * const *keywords,
131131
<para>
132132
The passed arrays can be empty to use all default parameters, or can
133133
contain one or more parameter settings. They should be matched in length.
134-
Processing will stopwith thelast non-<symbol>NULL</symbol> element
135-
of the <literal>keywords</literal> array.
134+
Processing will stopat thefirst<symbol>NULL</symbol> element
135+
in the <literal>keywords</literal> array.
136136
</para>
137137

138138
<para>
139-
If any parameter isunspecified, then the corresponding
140-
environment variable (see <xref linkend="libpq-envars">)
141-
is checked.If the environment variable is not set either,
142-
then the indicatedbuilt-in defaults are used.
139+
If any parameter isNULL or an emptry string, the corresponding
140+
environment variable (see <xref linkend="libpq-envars">) is checked.
141+
If the environment variable is not set either, then the indicated
142+
built-in defaults are used.
143143
</para>
144144

145145
<para>

‎src/interfaces/libpq/fe-connect.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4357,7 +4357,7 @@ conninfo_array_parse(const char *const * keywords, const char *const * values,
43574357
constchar*pname=keywords[i];
43584358
constchar*pvalue=values[i];
43594359

4360-
if (pvalue!=NULL)
4360+
if (pvalue!=NULL&&pvalue[0]!='\0')
43614361
{
43624362
/* Search for the param record */
43634363
for (option=options;option->keyword!=NULL;option++)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp