1
0
mirror of https://github.com/postgres/postgres.git synced 2025-10-21 02:52:47 +03:00

Fix omission of -X (--no-psqlrc) in some psql invocations.

As of commit d5563d7df, psql -c no longer implies -X, but not all of
our regression testing scripts had gotten that memo.

To ensure consistency of results across different developers, make
sure that *all* invocations of psql in all scripts in our tree
use -X, even where this is not what previously happened.

Michael Paquier and Tom Lane
This commit is contained in:
Tom Lane
2015-12-28 11:46:32 -05:00
parent 151c4ffe41
commit 870df2b3b7
9 changed files with 21 additions and 21 deletions

View File

@@ -37,8 +37,8 @@ for f in char varchar text; do
dropdb testlocale >/dev/null 2>&1
createdb testlocale || abort "createdb failed"
psql -d testlocale -c "CREATE TABLE wordlist (name_en char(20), name_de $ftype);" >/dev/null 2>&1 || abort "createtable failed"
psql testlocale < test-de.sql.in > test-de-$f.sql.out 2>/dev/null || abort "test query failed"
psql -X -d testlocale -c "CREATE TABLE wordlist (name_en char(20), name_de $ftype);" >/dev/null 2>&1 || abort "createtable failed"
psql -X testlocale < test-de.sql.in > test-de-$f.sql.out 2>/dev/null || abort "test query failed"
diff expected/test-de-$f.sql.out test-de-$f.sql.out
done
@@ -52,13 +52,13 @@ for f in char varchar text; do
dropdb testlocale >/dev/null 2>&1
createdb testlocale || abort "createdb failed"
psql -d testlocale -c "CREATE TABLE wordlist (name_en char(20), name_de $ftype);" >/dev/null 2>&1 || abort "createtable failed"
psql testlocale < test-de-upper.sql.in > test-de-upper-$f.sql.out 2>/dev/null || abort "test query failed"
psql -X -d testlocale -c "CREATE TABLE wordlist (name_en char(20), name_de $ftype);" >/dev/null 2>&1 || abort "createtable failed"
psql -X testlocale < test-de-upper.sql.in > test-de-upper-$f.sql.out 2>/dev/null || abort "test query failed"
diff expected/test-de-upper-$f.sql.out test-de-upper-$f.sql.out
done
echo "Testing PgSQL: select on regexp..."
psql testlocale < test-de-select.sql.in > test-de-select.sql.out 2>/dev/null || abort "select query failed"
psql -X testlocale < test-de-select.sql.in > test-de-select.sql.out 2>/dev/null || abort "select query failed"
diff expected/test-de-select.sql.out test-de-select.sql.out
dropdb testlocale || abort "dropdb failed"
echo "Finished."

View File

@@ -38,12 +38,12 @@ for f in char varchar text; do
dropdb testlocale >/dev/null 2>&1
createdb testlocale || abort "createdb failed"
psql -d testlocale -c "CREATE TABLE usastates (abbrev char(2), name_en char(20), name_gr $ftype);" >/dev/null 2>&1 || abort "createtable failed"
psql testlocale < test-gr.sql.in > test-gr-$f.sql.out 2>/dev/null || abort "test query failed"
psql -X -d testlocale -c "CREATE TABLE usastates (abbrev char(2), name_en char(20), name_gr $ftype);" >/dev/null 2>&1 || abort "createtable failed"
psql -X testlocale < test-gr.sql.in > test-gr-$f.sql.out 2>/dev/null || abort "test query failed"
diff expected/test-gr-$f.sql.out test-gr-$f.sql.out
done
echo "Testing PgSQL: select on regexp..."
psql testlocale < test-gr-select.sql.in > test-gr-select.sql.out 2>/dev/null || abort "select query failed"
psql -X testlocale < test-gr-select.sql.in > test-gr-select.sql.out 2>/dev/null || abort "select query failed"
diff expected/test-gr-select.sql.out test-gr-select.sql.out
dropdb testlocale || abort "dropdb failed"
echo "Finished."

View File

@@ -38,12 +38,12 @@ for f in char varchar text; do
dropdb testlocale >/dev/null 2>&1
createdb testlocale || abort "createdb failed"
psql -d testlocale -c "CREATE TABLE usastates (abbrev char(2), name_en char(20), name_ru $ftype);" >/dev/null 2>&1 || abort "createtable failed"
psql testlocale < test-koi8.sql.in > test-koi8-$f.sql.out 2>/dev/null || abort "test query failed"
psql -X -d testlocale -c "CREATE TABLE usastates (abbrev char(2), name_en char(20), name_ru $ftype);" >/dev/null 2>&1 || abort "createtable failed"
psql -X testlocale < test-koi8.sql.in > test-koi8-$f.sql.out 2>/dev/null || abort "test query failed"
diff expected/test-koi8-$f.sql.out test-koi8-$f.sql.out
done
echo "Testing PgSQL: select on regexp..."
psql testlocale < test-koi8-select.sql.in > test-koi8-select.sql.out 2>/dev/null || abort "select query failed"
psql -X testlocale < test-koi8-select.sql.in > test-koi8-select.sql.out 2>/dev/null || abort "select query failed"
diff expected/test-koi8-select.sql.out test-koi8-select.sql.out
dropdb testlocale || abort "dropdb failed"
echo "Finished."

View File

@@ -35,12 +35,12 @@ for f in char varchar text; do
dropdb testlocale >/dev/null 2>&1
createdb testlocale || abort "createdb failed"
psql -d testlocale -c "CREATE TABLE usastates (abbrev char(2), name_en char(20), name_ru $ftype);" >/dev/null 2>&1 || abort "createtable failed"
psql testlocale < test-koi8.sql.in > test-koi8-$f.sql.out 2>/dev/null || abort "test query failed"
psql -X -d testlocale -c "CREATE TABLE usastates (abbrev char(2), name_en char(20), name_ru $ftype);" >/dev/null 2>&1 || abort "createtable failed"
psql -X testlocale < test-koi8.sql.in > test-koi8-$f.sql.out 2>/dev/null || abort "test query failed"
diff expected/test-koi8-$f.sql.out test-koi8-$f.sql.out
done
echo "Testing PgSQL: select on regexp..."
psql testlocale < test-koi8-select.sql.in > test-koi8-select.sql.out 2>/dev/null || abort "select query failed"
psql -X testlocale < test-koi8-select.sql.in > test-koi8-select.sql.out 2>/dev/null || abort "select query failed"
diff expected/test-koi8-select.sql.out test-koi8-select.sql.out
dropdb testlocale || abort "dropdb failed"
echo "Finished."

View File

@@ -17,7 +17,7 @@ fi
dropdb --if-exists utf8
createdb -T template0 -l C -E UTF8 utf8 || exit 1
PSQL="psql -n -e -q"
PSQL="psql -X -n -e -q"
# in the test list, client-only encodings must follow the server encoding
# they're to be tested with; see hard-coded cases below

View File

@@ -37,7 +37,7 @@ sub run_test_psql
my $logstring = $_[1];
my $cmd = [
'psql', '-A', '-t', '-c', "SELECT 'connected with $connstr'",
'psql', '-X', '-A', '-t', '-c', "SELECT 'connected with $connstr'",
'-d', "$connstr" ];
my $result = run_log($cmd);