diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2024-04-29 20:23:26 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2024-04-29 20:23:26 -0400 |
commit | 9d9ece4c16dbbaf3b9d60c2fe201b8e99a407be3 (patch) | |
tree | 6520290f2891a8800b8660084bcdc702d34e183b /src | |
parent | b0c5b215dace219ecf3b42cc2eb90abf7fd7a582 (diff) | |
download | postgresql-9d9ece4c16dbbaf3b9d60c2fe201b8e99a407be3.tar.gz postgresql-9d9ece4c16dbbaf3b9d60c2fe201b8e99a407be3.zip |
Fix test case from b0c5b215d.
I'd not checked that this iteration of the test actually worked
with a bootstrap superuser not named 'postgres'. It didn't,
because the coercion rules for CASE caused us to try to cast
the 'postgres' literal to regrole. Mea culpa.
Per buildfarm (via Alexander Korotkov)
Discussion: https://postgr.es/m/CAPpHfdsV=iTvH6B858hnH1bLgewYH6cdTnO_eOOw9EOa8kehkA@mail.gmail.com
Diffstat (limited to 'src')
-rw-r--r-- | src/test/modules/test_pg_dump/expected/test_pg_dump.out | 8 | ||||
-rw-r--r-- | src/test/modules/test_pg_dump/sql/test_pg_dump.sql | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/test/modules/test_pg_dump/expected/test_pg_dump.out b/src/test/modules/test_pg_dump/expected/test_pg_dump.out index fcfa78aafc0..dc493e5be26 100644 --- a/src/test/modules/test_pg_dump/expected/test_pg_dump.out +++ b/src/test/modules/test_pg_dump/expected/test_pg_dump.out @@ -65,9 +65,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' - ELSE a.grantor::regrole END, + ELSE a.grantor::regrole::name END, CASE WHEN a.grantee::regrole::name = current_user THEN 'postgres' - ELSE a.grantee::regrole END, + ELSE a.grantee::regrole::name END, a.privilege_type, a.is_grantable FROM (SELECT pg_describe_object(classoid,objoid,objsubid) AS obj, initprivs @@ -202,9 +202,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' - ELSE a.grantor::regrole END, + ELSE a.grantor::regrole::name END, CASE WHEN a.grantee::regrole::name = current_user THEN 'postgres' - ELSE a.grantee::regrole END, + ELSE a.grantee::regrole::name END, a.privilege_type, a.is_grantable FROM (SELECT pg_describe_object(classoid,objoid,objsubid) AS obj, initprivs 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 41f1d8dfc5c..48e99bb5ccd 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 @@ -78,9 +78,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' - ELSE a.grantor::regrole END, + ELSE a.grantor::regrole::name END, CASE WHEN a.grantee::regrole::name = current_user THEN 'postgres' - ELSE a.grantee::regrole END, + ELSE a.grantee::regrole::name END, a.privilege_type, a.is_grantable FROM (SELECT pg_describe_object(classoid,objoid,objsubid) AS obj, initprivs @@ -130,9 +130,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' - ELSE a.grantor::regrole END, + ELSE a.grantor::regrole::name END, CASE WHEN a.grantee::regrole::name = current_user THEN 'postgres' - ELSE a.grantee::regrole END, + ELSE a.grantee::regrole::name END, a.privilege_type, a.is_grantable FROM (SELECT pg_describe_object(classoid,objoid,objsubid) AS obj, initprivs |