From 0c3fc09fe359a6dc46f1870ceccf60ec60396bc9 Mon Sep 17 00:00:00 2001
From: Fujii Masao <fujii@postgresql.org>
Date: Tue, 26 Jan 2021 17:16:52 +0900
Subject: 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/sql/postgres_fdw.sql | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

(limited to 'contrib/postgres_fdw/sql/postgres_fdw.sql')

diff --git a/contrib/postgres_fdw/sql/postgres_fdw.sql b/contrib/postgres_fdw/sql/postgres_fdw.sql
index 62382d1a55..647192cf6a 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
-- 
cgit v1.2.1

