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

Commit15cb0bf

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 parentb170ca0 commit15cb0bf

File tree

2 files changed

+23
-4
lines changed

2 files changed

+23
-4
lines changed

‎src/test/perl/TestLib.pm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ BEGIN
6262
delete$ENV{LC_ALL};
6363
$ENV{LC_MESSAGES} ='C';
6464

65+
# This list should be kept in sync with pg_regress.c.
6566
my@envkeys =qw (
6667
PGCLIENTENCODING
6768
PGCONNECT_TIMEOUT

‎src/test/regress/pg_regress.c

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -800,14 +800,32 @@ initialize_environment(void)
800800
* we also use psql's -X switch consistently, so that ~/.psqlrc files
801801
* won't mess things up.) Also, set PGPORT to the temp port, and set
802802
* PGHOST depending on whether we are using TCP or Unix sockets.
803+
*
804+
* This list should be kept in sync with TestLib.pm.
803805
*/
806+
/* PGCLIENTENCODING, see above */
807+
unsetenv("PGCONNECT_TIMEOUT");
808+
unsetenv("PGDATA");
804809
unsetenv("PGDATABASE");
805-
unsetenv("PGUSER");
810+
unsetenv("PGGSSLIB");
811+
/* PGHOSTADDR, see below */
812+
unsetenv("PGKRBSRVNAME");
813+
unsetenv("PGPASSFILE");
814+
unsetenv("PGPASSWORD");
815+
unsetenv("PGREQUIREPEER");
816+
unsetenv("PGREQUIRESSL");
806817
unsetenv("PGSERVICE");
818+
unsetenv("PGSERVICEFILE");
819+
unsetenv("PGSSLCERT");
820+
unsetenv("PGSSLCRL");
821+
unsetenv("PGSSLKEY");
807822
unsetenv("PGSSLMODE");
808-
unsetenv("PGREQUIRESSL");
809-
unsetenv("PGCONNECT_TIMEOUT");
810-
unsetenv("PGDATA");
823+
unsetenv("PGSSLROOTCERT");
824+
unsetenv("PGTARGETSESSIONATTRS");
825+
unsetenv("PGUSER");
826+
/* PGPORT, see below */
827+
/* PGHOST, see below */
828+
811829
#ifdefHAVE_UNIX_SOCKETS
812830
if (hostname!=NULL)
813831
doputenv("PGHOST",hostname);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp