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
This commit is contained in:
Fujii Masao 2021-01-26 17:16:52 +09:00
parent 6adc5376dc
commit 0c3fc09fe3
2 changed files with 24 additions and 24 deletions

View File

@ -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
-- ===================================================================

View File

@ -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