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

Commit1eb2231

Browse files
committed
Allow pg_upgrade with PGCLIENTENCODING set
This used to work, but since PGCLIENTENCODING is now a connectionoption variable, pg_upgrade would prevent it.
1 parent1471a14 commit1eb2231

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

‎contrib/pg_upgrade/server.c

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -326,21 +326,26 @@ check_for_libpq_envvars(void)
326326

327327
/* Get valid libpq env vars from the PQconndefaults function */
328328

329-
start=option=PQconndefaults();
329+
start=PQconndefaults();
330330

331-
while (option->keyword!=NULL)
331+
for (option=start;option->keyword!=NULL;option++)
332332
{
333-
constchar*value;
334-
335-
if (option->envvar&& (value=getenv(option->envvar))&&strlen(value)>0)
333+
if (option->envvar)
336334
{
337-
found= true;
335+
constchar*value;
338336

339-
pg_log(PG_WARNING,
340-
"libpq env var %-20s is currently set to: %s\n",option->envvar,value);
341-
}
337+
if (strcmp(option->envvar,"PGCLIENTENCODING")==0)
338+
continue;
342339

343-
option++;
340+
value=getenv(option->envvar);
341+
if (value&&strlen(value)>0)
342+
{
343+
found= true;
344+
345+
pg_log(PG_WARNING,
346+
"libpq env var %-20s is currently set to: %s\n",option->envvar,value);
347+
}
348+
}
344349
}
345350

346351
/* Free the memory that libpq allocated on our behalf */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp