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

Commita9e0b3b

Browse files
committed
Ignore more environment variables in pg_regress.c
This is similar to the work done in8279f68 for TestLib.pm, whereenvironment variables set may cause unwanted failures if using atemporary installation with pg_regress. The list of variables reset isadjusted in each stable branch depending on what is supported.Comments are added to remember that the lists in TestLib.pm andpg_regress.c had better be kept in sync.Reviewed-by: Álvaro HerreraDiscussion:https://postgr.es/m/YMNR9GYDn+fHlMta@paquier.xyzBackpatch-through: 9.6
1 parentf452aaf commita9e0b3b

File tree

2 files changed

+29
-4
lines changed

2 files changed

+29
-4
lines changed

‎src/test/perl/TestLib.pm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ BEGIN
104104
delete$ENV{LC_ALL};
105105
$ENV{LC_MESSAGES} ='C';
106106

107+
# This list should be kept in sync with pg_regress.c.
107108
my@envkeys =qw (
108109
PGCHANNELBINDING
109110
PGCLIENTENCODING

‎src/test/regress/pg_regress.c

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -819,14 +819,38 @@ initialize_environment(void)
819819
* we also use psql's -X switch consistently, so that ~/.psqlrc files
820820
* won't mess things up.) Also, set PGPORT to the temp port, and set
821821
* PGHOST depending on whether we are using TCP or Unix sockets.
822+
*
823+
* This list should be kept in sync with TestLib.pm.
822824
*/
825+
unsetenv("PGCHANNELBINDING");
826+
/* PGCLIENTENCODING, see above */
827+
unsetenv("PGCONNECT_TIMEOUT");
828+
unsetenv("PGDATA");
823829
unsetenv("PGDATABASE");
824-
unsetenv("PGUSER");
830+
unsetenv("PGGSSENCMODE");
831+
unsetenv("PGGSSLIB");
832+
/* PGHOSTADDR, see below */
833+
unsetenv("PGKRBSRVNAME");
834+
unsetenv("PGPASSFILE");
835+
unsetenv("PGPASSWORD");
836+
unsetenv("PGREQUIREPEER");
837+
unsetenv("PGREQUIRESSL");
825838
unsetenv("PGSERVICE");
839+
unsetenv("PGSERVICEFILE");
840+
unsetenv("PGSSLCERT");
841+
unsetenv("PGSSLCRL");
842+
unsetenv("PGSSLCRLDIR");
843+
unsetenv("PGSSLKEY");
844+
unsetenv("PGSSLMAXPROTOCOLVERSION");
845+
unsetenv("PGSSLMINPROTOCOLVERSION");
826846
unsetenv("PGSSLMODE");
827-
unsetenv("PGREQUIRESSL");
828-
unsetenv("PGCONNECT_TIMEOUT");
829-
unsetenv("PGDATA");
847+
unsetenv("PGSSLROOTCERT");
848+
unsetenv("PGSSLSNI");
849+
unsetenv("PGTARGETSESSIONATTRS");
850+
unsetenv("PGUSER");
851+
/* PGPORT, see below */
852+
/* PGHOST, see below */
853+
830854
#ifdefHAVE_UNIX_SOCKETS
831855
if (hostname!=NULL)
832856
setenv("PGHOST",hostname,1);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp