@@ -100,46 +100,9 @@ SELECT n.nspname, proname, prorettype::regtype, proisagg, a.rolname
100100(8 rows)
101101
102102--
103- -- Collation
103+ -- We would test collations here, but it's not possible because the error
104+ -- messages tend to be nonportable.
104105--
105- SET SESSION AUTHORIZATION regtest_alter_user1;
106- CREATE COLLATION alt_coll1 (locale = 'C');
107- CREATE COLLATION alt_coll2 (locale = 'C');
108- -- can't test this: the error message includes the encoding name
109- -- ALTER COLLATION alt_coll1 RENAME TO alt_coll2; -- failed (name conflict)
110- ALTER COLLATION alt_coll1 RENAME TO alt_coll3; -- OK
111- ALTER COLLATION alt_coll2 OWNER TO regtest_alter_user2; -- failed (no role membership)
112- ERROR: must be member of role "regtest_alter_user2"
113- ALTER COLLATION alt_coll2 OWNER TO regtest_alter_user3; -- OK
114- ALTER COLLATION alt_coll2 SET SCHEMA alt_nsp2; -- OK
115- SET SESSION AUTHORIZATION regtest_alter_user2;
116- CREATE COLLATION alt_coll1 (locale = 'C');
117- CREATE COLLATION alt_coll2 (locale = 'C');
118- ALTER COLLATION alt_coll3 RENAME TO alt_coll4; -- failed (not owner)
119- ERROR: must be owner of collation alt_coll3
120- ALTER COLLATION alt_coll1 RENAME TO alt_coll4; -- OK
121- ALTER COLLATION alt_coll3 OWNER TO regtest_alter_user2; -- failed (not owner)
122- ERROR: must be owner of collation alt_coll3
123- ALTER COLLATION alt_coll2 OWNER TO regtest_alter_user3; -- failed (no role membership)
124- ERROR: must be member of role "regtest_alter_user3"
125- ALTER COLLATION alt_coll3 SET SCHEMA alt_nsp2; -- failed (not owner)
126- ERROR: must be owner of collation alt_coll3
127- -- can't test this: the error message includes the encoding name
128- -- ALTER COLLATION alt_coll2 SET SCHEMA alt_nsp2; -- failed (name conflict)
129- RESET SESSION AUTHORIZATION;
130- SELECT n.nspname, c.collname, a.rolname
131- FROM pg_collation c, pg_namespace n, pg_authid a
132- WHERE c.collnamespace = n.oid AND c.collowner = a.oid
133- AND n.nspname IN ('alt_nsp1', 'alt_nsp2')
134- ORDER BY n.nspname, c.collname;
135- nspname | collname | rolname
136- ----------+-----------+---------------------
137- alt_nsp1 | alt_coll2 | regtest_alter_user2
138- alt_nsp1 | alt_coll3 | regtest_alter_user1
139- alt_nsp1 | alt_coll4 | regtest_alter_user2
140- alt_nsp2 | alt_coll2 | regtest_alter_user3
141- (4 rows)
142-
143106--
144107-- Conversion
145108--
@@ -316,6 +279,7 @@ ALTER OPERATOR FAMILY alt_opf2 USING hash OWNER TO regtest_alter_user3; -- fail
316279ERROR: must be member of role "regtest_alter_user3"
317280ALTER OPERATOR FAMILY alt_opf3 USING hash SET SCHEMA alt_nsp2; -- failed (not owner)
318281ERROR: must be owner of operator family alt_opf3
282+ -- can't test this: the error message includes the raw oid of namespace
319283-- ALTER OPERATOR FAMILY alt_opf2 USING hash SET SCHEMA alt_nsp2; -- failed (name conflict)
320284ALTER OPERATOR CLASS alt_opc3 USING hash RENAME TO alt_opc4;-- failed (not owner)
321285ERROR: must be owner of operator class alt_opc3
@@ -326,6 +290,7 @@ ALTER OPERATOR CLASS alt_opc2 USING hash OWNER TO regtest_alter_user3; -- faile
326290ERROR: must be member of role "regtest_alter_user3"
327291ALTER OPERATOR CLASS alt_opc3 USING hash SET SCHEMA alt_nsp2; -- failed (not owner)
328292ERROR: must be owner of operator class alt_opc3
293+ -- can't test this: the error message includes the raw oid of namespace
329294-- ALTER OPERATOR CLASS alt_opc2 USING hash SET SCHEMA alt_nsp2; -- failed (name conflict)
330295RESET SESSION AUTHORIZATION;
331296SELECT nspname, opfname, amname, rolname
@@ -498,16 +463,13 @@ DROP LANGUAGE alt_lang3 CASCADE;
498463DROP LANGUAGE alt_lang4 CASCADE;
499464ERROR: language "alt_lang4" does not exist
500465DROP SCHEMA alt_nsp1 CASCADE;
501- NOTICE: drop cascades to29 other objects
466+ NOTICE: drop cascades to26 other objects
502467DETAIL: drop cascades to function alt_func3(integer)
503468drop cascades to function alt_agg3(integer)
504469drop cascades to function alt_func4(integer)
505470drop cascades to function alt_func2(integer)
506471drop cascades to function alt_agg4(integer)
507472drop cascades to function alt_agg2(integer)
508- drop cascades to collation alt_coll3
509- drop cascades to collation alt_coll4
510- drop cascades to collation alt_coll2
511473drop cascades to conversion alt_conv3
512474drop cascades to conversion alt_conv4
513475drop cascades to conversion alt_conv2
@@ -529,10 +491,9 @@ drop cascades to text search template alt_ts_temp2
529491drop cascades to text search parser alt_ts_prs3
530492drop cascades to text search parser alt_ts_prs2
531493DROP SCHEMA alt_nsp2 CASCADE;
532- NOTICE: drop cascades to10 other objects
494+ NOTICE: drop cascades to9 other objects
533495DETAIL: drop cascades to function alt_nsp2.alt_func2(integer)
534496drop cascades to function alt_nsp2.alt_agg2(integer)
535- drop cascades to collation alt_coll2
536497drop cascades to conversion alt_conv2
537498drop cascades to operator alt_nsp2.@-@(integer,integer)
538499drop cascades to operator family alt_nsp2.alt_opf2 for access method hash