You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudberry.apache.org by ma...@apache.org on 2025/02/13 01:05:49 UTC
(cloudberry) 03/11: Ignore any local .psqlrc when running tests.
This is an automated email from the ASF dual-hosted git repository.
maxyang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry.git
commit 52f696e3810c9e8a8ab4ae290819868b7e296501
Author: Jianghua Yang <yj...@gmail.com>
AuthorDate: Tue Feb 11 19:32:26 2025 +0800
Ignore any local .psqlrc when running tests.
---
src/test/regress/expected/async.out | 2 +-
src/test/regress/expected/dboptions.out | 6 +++---
src/test/regress/expected/distributed_transactions.out | 4 ++--
src/test/regress/expected/minirepro.out | 6 +++---
src/test/regress/input/createdb.source | 6 +++---
src/test/regress/input/gpcopy.source | 2 +-
src/test/regress/output/createdb.source | 8 ++++----
src/test/regress/output/gpcopy.source | 2 +-
src/test/regress/sql/async.sql | 2 +-
src/test/regress/sql/dboptions.sql | 4 ++--
src/test/regress/sql/distributed_transactions.sql | 2 +-
src/test/regress/sql/gpsd.sql | 4 ++--
src/test/regress/sql/minirepro.sql | 6 +++---
13 files changed, 27 insertions(+), 27 deletions(-)
diff --git a/src/test/regress/expected/async.out b/src/test/regress/expected/async.out
index 277b8963fa..784de2e99f 100644
--- a/src/test/regress/expected/async.out
+++ b/src/test/regress/expected/async.out
@@ -46,7 +46,7 @@ SELECT pg_notification_queue_usage();
-- end_matchsubs
\c postgres
LISTEN notify_async3;
-\! psql postgres -c "notify notify_async3;"
+\! psql postgres -Xc "notify notify_async3;"
NOTIFY
SELECT;
--
diff --git a/src/test/regress/expected/dboptions.out b/src/test/regress/expected/dboptions.out
index 683c196d75..3dfdf91cc4 100644
--- a/src/test/regress/expected/dboptions.out
+++ b/src/test/regress/expected/dboptions.out
@@ -41,7 +41,7 @@ select pg_reload_conf();
(1 row)
-- should fail, because the connection limit is 0
-\! psql -h /tmp limitdb -c "select 'connected'" -U connlimit_test_user
+\! psql -h /tmp limitdb -Xc "select 'connected'" -U connlimit_test_user
psql: error: connection to server on socket "/tmp/.s.PGSQL.7000" failed: FATAL: too many connections for database "limitdb"
-- Test ALLOW_CONNECTIONS
create database limitdb2 allow_connections = true;
@@ -71,7 +71,7 @@ order by gp_segment_id;
(4 rows)
-- should fail, as we have disallowed connections
-\! psql -h /tmp limitdb2 -c "select 'connected'" -U connlimit_test_user
+\! psql -h /tmp limitdb2 -Xc "select 'connected'" -U connlimit_test_user
psql: error: connection to server on socket "/tmp/.s.PGSQL.7000" failed: FATAL: database "limitdb2" is not currently accepting connections
-- Test IS_TEMPLATE
create database templatedb is_template=true;
@@ -89,7 +89,7 @@ order by gp_segment_id;
\c templatedb
create table templatedb_table(i int);
-NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'i' as the Greenplum Database data distribution key for this table.
+NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'i' as the Cloudberry Database data distribution key for this table.
HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
\c regression
create database copieddb template templatedb;
diff --git a/src/test/regress/expected/distributed_transactions.out b/src/test/regress/expected/distributed_transactions.out
index 63af7f2723..67c1df6ced 100755
--- a/src/test/regress/expected/distributed_transactions.out
+++ b/src/test/regress/expected/distributed_transactions.out
@@ -355,8 +355,8 @@ end;
drop table if exists dtmcurse_foo;
drop table if exists dtmcurse_bar;
-- Test distribute transaction if 'COMMIT/END' is included in a multi-queries command.
-\! psql postgres -c "begin;end; create table dtx_test1(c1 int); drop table dtx_test1;"
-NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'c1' as the Cloudberry Database data distribution key for this table.
+\! psql postgres -Xc "begin;end; create table dtx_test1(c1 int); drop table dtx_test1;"
+NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'c1' as the Greenplum Database data distribution key for this table.
HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
DROP TABLE
-- Test two phase commit for extended query
diff --git a/src/test/regress/expected/minirepro.out b/src/test/regress/expected/minirepro.out
index cad9f00dcc..2c06ccfdf9 100644
--- a/src/test/regress/expected/minirepro.out
+++ b/src/test/regress/expected/minirepro.out
@@ -158,7 +158,7 @@ analyze minirepro_foo;
-- end_ignore
-- Run minirepro
drop table minirepro_foo; -- this will also delete the pg_statistic tuples for minirepro_foo and minirepro_foo_1
-\! psql -f data/minirepro.sql regression
+\! psql -Xf data/minirepro.sql regression
You are now connected to database "regression" as user "pivotal".
SET
SET
@@ -243,7 +243,7 @@ update pg_statistic set stavalues3='{"hello", "''world''"}'::text[] where starel
-- end_ignore
-- Run minirepro
drop table minirepro_foo; -- this should also delete the pg_statistic tuple for minirepro_foo
-\! psql -f data/minirepro.sql regression
+\! psql -Xf data/minirepro.sql regression
You are now connected to database "regression" as user "pivotal".
SET
SET
@@ -285,7 +285,7 @@ drop table minirepro_foo;
-- Caution: The following operation will remove the pg_statistic tuple
-- corresponding to pg_tablespace before it re-inserts it, which may lead to
-- corrupted stats for pg_tablespace. But, that shouldn't matter too much?
-\! psql -f data/minirepro.sql regression
+\! psql -Xf data/minirepro.sql regression
You are now connected to database "regression" as user "pivotal".
SET
SET
diff --git a/src/test/regress/input/createdb.source b/src/test/regress/input/createdb.source
index 8adb627471..7118513bb1 100644
--- a/src/test/regress/input/createdb.source
+++ b/src/test/regress/input/createdb.source
@@ -22,9 +22,9 @@ select force_mirrors_to_catch_up();
select count(*)=0 as result from
(select db_dirs(oid) from pg_database where datname = 'dowell') as foo;
-\! psql -d dowell -c "create table test1(a int, b text)"
-\! psql -d dowell -c "insert into test1 values (1, '111'), (2, '222'), (3, '333')"
-\! psql -d dowell -c "select * from test1"
+\! psql -d dowell -Xc "create table test1(a int, b text)"
+\! psql -d dowell -Xc "insert into test1 values (1, '111'), (2, '222'), (3, '333')"
+\! psql -d dowell -Xc "select * from test1"
drop database dowell;
diff --git a/src/test/regress/input/gpcopy.source b/src/test/regress/input/gpcopy.source
index 76e03ac487..3328c96627 100644
--- a/src/test/regress/input/gpcopy.source
+++ b/src/test/regress/input/gpcopy.source
@@ -669,7 +669,7 @@ COPY (SELECT * FROM segment_reject_limit_from) TO '/tmp/segment_reject_limit<SEG
-- 'COPY (SELECT ...) TO' on utility mode
CREATE EXTERNAL WEB TABLE copy_cmd_utility(a text, b int)
EXECUTE E'PGOPTIONS="-c gp_role=utility" \\
- psql -p $GP_MASTER_PORT $GP_DATABASE $GP_USER -c \\
+ psql -X -p $GP_MASTER_PORT $GP_DATABASE $GP_USER -c \\
"COPY (SELECT * FROM pg_class) TO \'/dev/null\'"'
ON COORDINATOR FORMAT 'text' (DELIMITER ' ');
SELECT a FROM copy_cmd_utility;
diff --git a/src/test/regress/output/createdb.source b/src/test/regress/output/createdb.source
index a0b117ae9c..6bcb3d8627 100644
--- a/src/test/regress/output/createdb.source
+++ b/src/test/regress/output/createdb.source
@@ -34,13 +34,13 @@ select count(*)=0 as result from
f
(1 row)
-\! psql -d dowell -c "create table test1(a int, b text)"
-NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'a' as the Cloudberry Database data distribution key for this table.
+\! psql -d dowell -Xc "create table test1(a int, b text)"
+NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'a' as the Greenplum Database data distribution key for this table.
HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.
CREATE TABLE
-\! psql -d dowell -c "insert into test1 values (1, '111'), (2, '222'), (3, '333')"
+\! psql -d dowell -Xc "insert into test1 values (1, '111'), (2, '222'), (3, '333')"
INSERT 0 3
-\! psql -d dowell -c "select * from test1"
+\! psql -d dowell -Xc "select * from test1"
a | b
---+-----
2 | 222
diff --git a/src/test/regress/output/gpcopy.source b/src/test/regress/output/gpcopy.source
index 092ebb76e7..a5fd552c2b 100755
--- a/src/test/regress/output/gpcopy.source
+++ b/src/test/regress/output/gpcopy.source
@@ -704,7 +704,7 @@ COPY (SELECT * FROM segment_reject_limit_from) TO '/tmp/segment_reject_limit<SEG
-- 'COPY (SELECT ...) TO' on utility mode
CREATE EXTERNAL WEB TABLE copy_cmd_utility(a text, b int)
EXECUTE E'PGOPTIONS="-c gp_role=utility" \\
- psql -p $GP_MASTER_PORT $GP_DATABASE $GP_USER -c \\
+ psql -X -p $GP_MASTER_PORT $GP_DATABASE $GP_USER -c \\
"COPY (SELECT * FROM pg_class) TO \'/dev/null\'"'
ON COORDINATOR FORMAT 'text' (DELIMITER ' ');
SELECT a FROM copy_cmd_utility;
diff --git a/src/test/regress/sql/async.sql b/src/test/regress/sql/async.sql
index bff0c3760c..4cc7f7ad80 100644
--- a/src/test/regress/sql/async.sql
+++ b/src/test/regress/sql/async.sql
@@ -28,6 +28,6 @@ SELECT pg_notification_queue_usage();
-- end_matchsubs
\c postgres
LISTEN notify_async3;
-\! psql postgres -c "notify notify_async3;"
+\! psql postgres -Xc "notify notify_async3;"
SELECT;
\c -
diff --git a/src/test/regress/sql/dboptions.sql b/src/test/regress/sql/dboptions.sql
index 7df79e585b..e98f7112f1 100644
--- a/src/test/regress/sql/dboptions.sql
+++ b/src/test/regress/sql/dboptions.sql
@@ -24,7 +24,7 @@ create user connlimit_test_user;
select pg_reload_conf();
-- should fail, because the connection limit is 0
-\! psql -h /tmp limitdb -c "select 'connected'" -U connlimit_test_user
+\! psql -h /tmp limitdb -Xc "select 'connected'" -U connlimit_test_user
-- Test ALLOW_CONNECTIONS
create database limitdb2 allow_connections = true;
@@ -40,7 +40,7 @@ select gp_segment_id, datconnlimit, datallowconn from gp_dist_random('pg_databas
order by gp_segment_id;
-- should fail, as we have disallowed connections
-\! psql -h /tmp limitdb2 -c "select 'connected'" -U connlimit_test_user
+\! psql -h /tmp limitdb2 -Xc "select 'connected'" -U connlimit_test_user
-- Test IS_TEMPLATE
create database templatedb is_template=true;
diff --git a/src/test/regress/sql/distributed_transactions.sql b/src/test/regress/sql/distributed_transactions.sql
index 7dc7bd3d67..6e4ee9aee1 100644
--- a/src/test/regress/sql/distributed_transactions.sql
+++ b/src/test/regress/sql/distributed_transactions.sql
@@ -299,7 +299,7 @@ drop table if exists dtmcurse_foo;
drop table if exists dtmcurse_bar;
-- Test distribute transaction if 'COMMIT/END' is included in a multi-queries command.
-\! psql postgres -c "begin;end; create table dtx_test1(c1 int); drop table dtx_test1;"
+\! psql postgres -Xc "begin;end; create table dtx_test1(c1 int); drop table dtx_test1;"
-- Test two phase commit for extended query
\! ./twophase_pqexecparams dbname=regression
diff --git a/src/test/regress/sql/gpsd.sql b/src/test/regress/sql/gpsd.sql
index 494d708e89..224f663d08 100644
--- a/src/test/regress/sql/gpsd.sql
+++ b/src/test/regress/sql/gpsd.sql
@@ -35,7 +35,7 @@ drop database gpsd_db_without_hll;
create database gpsd_db_without_hll;
-- start_ignore
-\! psql -f data/gpsd-without-hll.sql gpsd_db_without_hll
+\! psql -Xf data/gpsd-without-hll.sql gpsd_db_without_hll
-- end_ignore
\c gpsd_db_without_hll
@@ -101,7 +101,7 @@ drop database gpsd_db_with_hll;
create database gpsd_db_with_hll;
-- start_ignore
-\! psql -f data/gpsd-with-hll.sql gpsd_db_with_hll
+\! psql -Xf data/gpsd-with-hll.sql gpsd_db_with_hll
-- end_ignore
\c gpsd_db_with_hll
diff --git a/src/test/regress/sql/minirepro.sql b/src/test/regress/sql/minirepro.sql
index 397bb614b8..207a76feb5 100644
--- a/src/test/regress/sql/minirepro.sql
+++ b/src/test/regress/sql/minirepro.sql
@@ -87,7 +87,7 @@ analyze minirepro_foo;
-- Run minirepro
drop table minirepro_foo; -- this will also delete the pg_statistic tuples for minirepro_foo and minirepro_foo_1
-\! psql -f data/minirepro.sql regression
+\! psql -Xf data/minirepro.sql regression
select
staattnum,
@@ -146,7 +146,7 @@ update pg_statistic set stavalues3='{"hello", "''world''"}'::text[] where starel
-- Run minirepro
drop table minirepro_foo; -- this should also delete the pg_statistic tuple for minirepro_foo
-\! psql -f data/minirepro.sql regression
+\! psql -Xf data/minirepro.sql regression
select stavalues3 from pg_statistic where starelid='minirepro_foo'::regclass;
@@ -168,7 +168,7 @@ drop table minirepro_foo;
-- Caution: The following operation will remove the pg_statistic tuple
-- corresponding to pg_tablespace before it re-inserts it, which may lead to
-- corrupted stats for pg_tablespace. But, that shouldn't matter too much?
-\! psql -f data/minirepro.sql regression
+\! psql -Xf data/minirepro.sql regression
select
staattnum,
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org