Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 9d9ece4

Browse files
committed
Fix test case from b0c5b21.
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
1 parent b0c5b21 commit 9d9ece4

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/test/modules/test_pg_dump/expected/test_pg_dump.out

+4-4
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ GRANT USAGE ON TYPE test_pg_dump_e1 TO regress_dump_test_role;
6565
-- Substitute for current user's name to keep test output consistent
6666
SELECT s.obj,
6767
CASE WHEN a.grantor::regrole::name = current_user THEN 'postgres'
68-
ELSE a.grantor::regrole END,
68+
ELSE a.grantor::regrole::name END,
6969
CASE WHEN a.grantee::regrole::name = current_user THEN 'postgres'
70-
ELSE a.grantee::regrole END,
70+
ELSE a.grantee::regrole::name END,
7171
a.privilege_type, a.is_grantable
7272
FROM
7373
(SELECT pg_describe_object(classoid,objoid,objsubid) AS obj, initprivs
@@ -202,9 +202,9 @@ DROP OWNED BY regress_dump_test_role RESTRICT;
202202
-- Substitute for current user's name to keep test output consistent
203203
SELECT s.obj,
204204
CASE WHEN a.grantor::regrole::name = current_user THEN 'postgres'
205-
ELSE a.grantor::regrole END,
205+
ELSE a.grantor::regrole::name END,
206206
CASE WHEN a.grantee::regrole::name = current_user THEN 'postgres'
207-
ELSE a.grantee::regrole END,
207+
ELSE a.grantee::regrole::name END,
208208
a.privilege_type, a.is_grantable
209209
FROM
210210
(SELECT pg_describe_object(classoid,objoid,objsubid) AS obj, initprivs

src/test/modules/test_pg_dump/sql/test_pg_dump.sql

+4-4
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,9 @@ GRANT USAGE ON TYPE test_pg_dump_e1 TO regress_dump_test_role;
7878
-- Substitute for current user's name to keep test output consistent
7979
SELECT s.obj,
8080
CASE WHEN a.grantor::regrole::name = current_user THEN 'postgres'
81-
ELSE a.grantor::regrole END,
81+
ELSE a.grantor::regrole::name END,
8282
CASE WHEN a.grantee::regrole::name = current_user THEN 'postgres'
83-
ELSE a.grantee::regrole END,
83+
ELSE a.grantee::regrole::name END,
8484
a.privilege_type, a.is_grantable
8585
FROM
8686
(SELECT pg_describe_object(classoid,objoid,objsubid) AS obj, initprivs
@@ -130,9 +130,9 @@ DROP OWNED BY regress_dump_test_role RESTRICT;
130130
-- Substitute for current user's name to keep test output consistent
131131
SELECT s.obj,
132132
CASE WHEN a.grantor::regrole::name = current_user THEN 'postgres'
133-
ELSE a.grantor::regrole END,
133+
ELSE a.grantor::regrole::name END,
134134
CASE WHEN a.grantee::regrole::name = current_user THEN 'postgres'
135-
ELSE a.grantee::regrole END,
135+
ELSE a.grantee::regrole::name END,
136136
a.privilege_type, a.is_grantable
137137
FROM
138138
(SELECT pg_describe_object(classoid,objoid,objsubid) AS obj, initprivs

0 commit comments

Comments
 (0)