@@ -100,46 +100,9 @@ SELECT n.nspname, proname, prorettype::regtype, proisagg, a.rolname
100
100
(8 rows)
101
101
102
102
--
103
- -- Collation
103
+ -- We would test collations here, but it's not possible because the error
104
+ -- messages tend to be nonportable.
104
105
--
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
-
143
106
--
144
107
-- Conversion
145
108
--
@@ -316,6 +279,7 @@ ALTER OPERATOR FAMILY alt_opf2 USING hash OWNER TO regtest_alter_user3; -- fail
316
279
ERROR: must be member of role "regtest_alter_user3"
317
280
ALTER OPERATOR FAMILY alt_opf3 USING hash SET SCHEMA alt_nsp2; -- failed (not owner)
318
281
ERROR: must be owner of operator family alt_opf3
282
+ -- can't test this: the error message includes the raw oid of namespace
319
283
-- ALTER OPERATOR FAMILY alt_opf2 USING hash SET SCHEMA alt_nsp2; -- failed (name conflict)
320
284
ALTER OPERATOR CLASS alt_opc3 USING hash RENAME TO alt_opc4; -- failed (not owner)
321
285
ERROR: 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
326
290
ERROR: must be member of role "regtest_alter_user3"
327
291
ALTER OPERATOR CLASS alt_opc3 USING hash SET SCHEMA alt_nsp2; -- failed (not owner)
328
292
ERROR: must be owner of operator class alt_opc3
293
+ -- can't test this: the error message includes the raw oid of namespace
329
294
-- ALTER OPERATOR CLASS alt_opc2 USING hash SET SCHEMA alt_nsp2; -- failed (name conflict)
330
295
RESET SESSION AUTHORIZATION;
331
296
SELECT nspname, opfname, amname, rolname
@@ -498,16 +463,13 @@ DROP LANGUAGE alt_lang3 CASCADE;
498
463
DROP LANGUAGE alt_lang4 CASCADE;
499
464
ERROR: language "alt_lang4" does not exist
500
465
DROP SCHEMA alt_nsp1 CASCADE;
501
- NOTICE: drop cascades to 29 other objects
466
+ NOTICE: drop cascades to 26 other objects
502
467
DETAIL: drop cascades to function alt_func3(integer)
503
468
drop cascades to function alt_agg3(integer)
504
469
drop cascades to function alt_func4(integer)
505
470
drop cascades to function alt_func2(integer)
506
471
drop cascades to function alt_agg4(integer)
507
472
drop 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
511
473
drop cascades to conversion alt_conv3
512
474
drop cascades to conversion alt_conv4
513
475
drop cascades to conversion alt_conv2
@@ -529,10 +491,9 @@ drop cascades to text search template alt_ts_temp2
529
491
drop cascades to text search parser alt_ts_prs3
530
492
drop cascades to text search parser alt_ts_prs2
531
493
DROP SCHEMA alt_nsp2 CASCADE;
532
- NOTICE: drop cascades to 10 other objects
494
+ NOTICE: drop cascades to 9 other objects
533
495
DETAIL: drop cascades to function alt_nsp2.alt_func2(integer)
534
496
drop cascades to function alt_nsp2.alt_agg2(integer)
535
- drop cascades to collation alt_coll2
536
497
drop cascades to conversion alt_conv2
537
498
drop cascades to operator alt_nsp2.@-@(integer,integer)
538
499
drop cascades to operator family alt_nsp2.alt_opf2 for access method hash
0 commit comments