diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2024-04-30 10:45:14 -0400 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2024-04-30 10:45:14 -0400 |
| commit | d12b4ba1bd3eedd862064cf1dad5ff107c5cba90 (patch) | |
| tree | 15c636af5022357c75d88d3190f8f0e26e3de974 /src/test/modules/test_pg_dump/sql | |
| parent | f6ab942f5de003f37b88580154ebb614655d7e11 (diff) | |
Fix one more portability shortcoming in new test_pg_dump test.
If the bootstrap superuser's name requires quoting, regroleout
will supply double quotes ... but the result of CURRENT_USER
is just the literal name. Apply quote_ident() to ensure a match.
Per Andrew Dunstan's off-list investigation of buildfarm member
prion's failures.
Diffstat (limited to 'src/test/modules/test_pg_dump/sql')
| -rw-r--r-- | src/test/modules/test_pg_dump/sql/test_pg_dump.sql | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/modules/test_pg_dump/sql/test_pg_dump.sql b/src/test/modules/test_pg_dump/sql/test_pg_dump.sql index 4598531ce7f..a56a945104d 100644 --- a/src/test/modules/test_pg_dump/sql/test_pg_dump.sql +++ b/src/test/modules/test_pg_dump/sql/test_pg_dump.sql @@ -77,9 +77,9 @@ GRANT USAGE ON TYPE test_pg_dump_e1 TO regress_dump_test_role; -- Substitute for current user's name to keep test output consistent SELECT s.obj, - CASE WHEN a.grantor::regrole::name = current_user THEN 'postgres' + CASE WHEN a.grantor::regrole::name = quote_ident(current_user) THEN 'postgres' ELSE a.grantor::regrole::name END, - CASE WHEN a.grantee::regrole::name = current_user THEN 'postgres' + CASE WHEN a.grantee::regrole::name = quote_ident(current_user) THEN 'postgres' ELSE a.grantee::regrole::name END, a.privilege_type, a.is_grantable FROM @@ -129,9 +129,9 @@ DROP OWNED BY regress_dump_test_role RESTRICT; -- Substitute for current user's name to keep test output consistent SELECT s.obj, - CASE WHEN a.grantor::regrole::name = current_user THEN 'postgres' + CASE WHEN a.grantor::regrole::name = quote_ident(current_user) THEN 'postgres' ELSE a.grantor::regrole::name END, - CASE WHEN a.grantee::regrole::name = current_user THEN 'postgres' + CASE WHEN a.grantee::regrole::name = quote_ident(current_user) THEN 'postgres' ELSE a.grantee::regrole::name END, a.privilege_type, a.is_grantable FROM |
