Skip to content

Commit d24d669

Browse files
committed
Fix unportable shell-script syntax in pg_upgrade's test.sh.
I discovered the hard way that on some old shells, the locution FOO="" unset FOO does not behave the same as FOO=""; unset FOO and in fact leaves FOO set to an empty string. test.sh was inconsistently spelling it different ways on adjacent lines. This got broken relatively recently, in commit c737a2e, so the lack of field reports to date doesn't represent a lot of evidence that the problem is rare.
1 parent 0bdeb1d commit d24d669

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

contrib/pg_upgrade/test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,10 @@ rm -rf "$BASE_PGDATA" "$PGDATA"
7676
PGDATABASE=""; unset PGDATABASE
7777
PGUSER=""; unset PGUSER
7878
PGSERVICE=""; unset PGSERVICE
79-
PGSSLMODE="" unset PGSSLMODE
79+
PGSSLMODE=""; unset PGSSLMODE
8080
PGREQUIRESSL=""; unset PGREQUIRESSL
8181
PGCONNECT_TIMEOUT=""; unset PGCONNECT_TIMEOUT
82-
PGHOST="" unset PGHOST
82+
PGHOST=""; unset PGHOST
8383
PGHOSTADDR=""; unset PGHOSTADDR
8484

8585
logdir=$PWD/log

0 commit comments

Comments
 (0)