postgres.git / summary / log / commit / refs
commit 0c3fc09fe359a6dc46f1870ceccf60ec60396bc9
Author: Fujii Masao <fujii@postgresql.org>
Date: Tue Jan 26 08:16:52 2021 +0000
First released in: 14.0
postgres_fdw: Fix test failure with -DENFORCE_REGRESSION_TEST_NAME_RESTRICTIONS
The roles created by regression test should have names starting with
"regress_", and the test introduced in commit 411ae64997 did not do that.
Per buildfarm member longfin.
Discussion: https://postgr.es/m/73fc5ae4-3c54-1262-4533-f8c547de2e60@oss.nttdata.com
contrib/postgres_fdw/expected/postgres_fdw.out | 24 ++++++++++++------------
contrib/postgres_fdw/sql/postgres_fdw.sql | 24 ++++++++++++------------
2 files changed, 24 insertions(+), 24 deletions(-)
diff --git a/contrib/postgres_fdw/expected/postgres_fdw.out b/contrib/postgres_fdw/expected/postgres_fdw.out
index 9d77d6e8505..07e06e5bf73 100644
--- a/contrib/postgres_fdw/expected/postgres_fdw.out
+++ b/contrib/postgres_fdw/expected/postgres_fdw.out
@@ -9267,12 +9267,12 @@ SELECT * FROM postgres_fdw_get_connections() ORDER BY 1;
-- =============================================================================
-- test case for having multiple cached connections for a foreign server
-- =============================================================================
-CREATE ROLE multi_conn_user1 SUPERUSER;
-CREATE ROLE multi_conn_user2 SUPERUSER;
-CREATE USER MAPPING FOR multi_conn_user1 SERVER loopback;
-CREATE USER MAPPING FOR multi_conn_user2 SERVER loopback;
--- Will cache loopback connection with user mapping for multi_conn_user1
-SET ROLE multi_conn_user1;
+CREATE ROLE regress_multi_conn_user1 SUPERUSER;
+CREATE ROLE regress_multi_conn_user2 SUPERUSER;
+CREATE USER MAPPING FOR regress_multi_conn_user1 SERVER loopback;
+CREATE USER MAPPING FOR regress_multi_conn_user2 SERVER loopback;
+-- Will cache loopback connection with user mapping for regress_multi_conn_user1
+SET ROLE regress_multi_conn_user1;
SELECT 1 FROM ft1 LIMIT 1;
?column?
----------
@@ -9280,8 +9280,8 @@ SELECT 1 FROM ft1 LIMIT 1;
(1 row)
RESET ROLE;
--- Will cache loopback connection with user mapping for multi_conn_user2
-SET ROLE multi_conn_user2;
+-- Will cache loopback connection with user mapping for regress_multi_conn_user2
+SET ROLE regress_multi_conn_user2;
SELECT 1 FROM ft1 LIMIT 1;
?column?
----------
@@ -9312,10 +9312,10 @@ SELECT * FROM postgres_fdw_get_connections() ORDER BY 1;
(0 rows)
-- Clean up
-DROP USER MAPPING FOR multi_conn_user1 SERVER loopback;
-DROP USER MAPPING FOR multi_conn_user2 SERVER loopback;
-DROP ROLE multi_conn_user1;
-DROP ROLE multi_conn_user2;
+DROP USER MAPPING FOR regress_multi_conn_user1 SERVER loopback;
+DROP USER MAPPING FOR regress_multi_conn_user2 SERVER loopback;
+DROP ROLE regress_multi_conn_user1;
+DROP ROLE regress_multi_conn_user2;
-- ===================================================================
-- batch insert
-- ===================================================================
diff --git a/contrib/postgres_fdw/sql/postgres_fdw.sql b/contrib/postgres_fdw/sql/postgres_fdw.sql
index 62382d1a55f..647192cf6ac 100644
--- a/contrib/postgres_fdw/sql/postgres_fdw.sql
+++ b/contrib/postgres_fdw/sql/postgres_fdw.sql
@@ -2801,18 +2801,18 @@ SELECT * FROM postgres_fdw_get_connections() ORDER BY 1;
-- =============================================================================
-- test case for having multiple cached connections for a foreign server
-- =============================================================================
-CREATE ROLE multi_conn_user1 SUPERUSER;
-CREATE ROLE multi_conn_user2 SUPERUSER;
-CREATE USER MAPPING FOR multi_conn_user1 SERVER loopback;
-CREATE USER MAPPING FOR multi_conn_user2 SERVER loopback;
+CREATE ROLE regress_multi_conn_user1 SUPERUSER;
+CREATE ROLE regress_multi_conn_user2 SUPERUSER;
+CREATE USER MAPPING FOR regress_multi_conn_user1 SERVER loopback;
+CREATE USER MAPPING FOR regress_multi_conn_user2 SERVER loopback;
--- Will cache loopback connection with user mapping for multi_conn_user1
-SET ROLE multi_conn_user1;
+-- Will cache loopback connection with user mapping for regress_multi_conn_user1
+SET ROLE regress_multi_conn_user1;
SELECT 1 FROM ft1 LIMIT 1;
RESET ROLE;
--- Will cache loopback connection with user mapping for multi_conn_user2
-SET ROLE multi_conn_user2;
+-- Will cache loopback connection with user mapping for regress_multi_conn_user2
+SET ROLE regress_multi_conn_user2;
SELECT 1 FROM ft1 LIMIT 1;
RESET ROLE;
@@ -2827,10 +2827,10 @@ SELECT postgres_fdw_disconnect('loopback');
SELECT * FROM postgres_fdw_get_connections() ORDER BY 1;
-- Clean up
-DROP USER MAPPING FOR multi_conn_user1 SERVER loopback;
-DROP USER MAPPING FOR multi_conn_user2 SERVER loopback;
-DROP ROLE multi_conn_user1;
-DROP ROLE multi_conn_user2;
+DROP USER MAPPING FOR regress_multi_conn_user1 SERVER loopback;
+DROP USER MAPPING FOR regress_multi_conn_user2 SERVER loopback;
+DROP ROLE regress_multi_conn_user1;
+DROP ROLE regress_multi_conn_user2;
-- ===================================================================
-- batch insert
[parent: 6adc5376dca4]