Skip to content

Commit 940311e

Browse files
committed
Un-hide most cascaded-drop details in regression test results.
Now that the ordering of DROP messages ought to be stable everywhere, we should not need these kluges of hiding DETAIL output just to avoid unstable ordering. Hiding it's not great for test coverage, so let's undo that where possible. In a small number of places, it's necessary to leave it in, for example because the output might include a variable pg_temp_nnn schema name. I also left things alone in places where the details would depend on other regression test scripts, e.g. plpython_drop.sql. Perhaps buildfarm experience will show this to be a bad idea, but if so I'd like to know why. Discussion: https://postgr.es/m/E1h6eep-0001Mw-Vd@gemulon.postgresql.org
1 parent af6550d commit 940311e

39 files changed

+313
-112
lines changed

src/test/regress/expected/alter_generic.out

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,6 @@ SELECT nspname, prsname
679679
---
680680
--- Cleanup resources
681681
---
682-
\set VERBOSITY terse \\ -- suppress cascade details
683682
DROP FOREIGN DATA WRAPPER alt_fdw2 CASCADE;
684683
NOTICE: drop cascades to server alt_fserv2
685684
DROP FOREIGN DATA WRAPPER alt_fdw3 CASCADE;
@@ -688,8 +687,45 @@ DROP LANGUAGE alt_lang2 CASCADE;
688687
DROP LANGUAGE alt_lang3 CASCADE;
689688
DROP SCHEMA alt_nsp1 CASCADE;
690689
NOTICE: drop cascades to 28 other objects
690+
DETAIL: drop cascades to function alt_func3(integer)
691+
drop cascades to function alt_agg3(integer)
692+
drop cascades to function alt_func4(integer)
693+
drop cascades to function alt_func2(integer)
694+
drop cascades to function alt_agg4(integer)
695+
drop cascades to function alt_agg2(integer)
696+
drop cascades to conversion alt_conv3
697+
drop cascades to conversion alt_conv4
698+
drop cascades to conversion alt_conv2
699+
drop cascades to operator @+@(integer,integer)
700+
drop cascades to operator @-@(integer,integer)
701+
drop cascades to operator family alt_opf3 for access method hash
702+
drop cascades to operator family alt_opc1 for access method hash
703+
drop cascades to operator family alt_opc2 for access method hash
704+
drop cascades to operator family alt_opf4 for access method hash
705+
drop cascades to operator family alt_opf2 for access method hash
706+
drop cascades to table alt_regress_1
707+
drop cascades to table alt_regress_2
708+
drop cascades to text search dictionary alt_ts_dict3
709+
drop cascades to text search dictionary alt_ts_dict4
710+
drop cascades to text search dictionary alt_ts_dict2
711+
drop cascades to text search configuration alt_ts_conf3
712+
drop cascades to text search configuration alt_ts_conf4
713+
drop cascades to text search configuration alt_ts_conf2
714+
drop cascades to text search template alt_ts_temp3
715+
drop cascades to text search template alt_ts_temp2
716+
drop cascades to text search parser alt_ts_prs3
717+
drop cascades to text search parser alt_ts_prs2
691718
DROP SCHEMA alt_nsp2 CASCADE;
692719
NOTICE: drop cascades to 9 other objects
720+
DETAIL: drop cascades to function alt_nsp2.alt_func2(integer)
721+
drop cascades to function alt_nsp2.alt_agg2(integer)
722+
drop cascades to conversion alt_nsp2.alt_conv2
723+
drop cascades to operator alt_nsp2.@-@(integer,integer)
724+
drop cascades to operator family alt_nsp2.alt_opf2 for access method hash
725+
drop cascades to text search dictionary alt_nsp2.alt_ts_dict2
726+
drop cascades to text search configuration alt_nsp2.alt_ts_conf2
727+
drop cascades to text search template alt_nsp2.alt_ts_temp2
728+
drop cascades to text search parser alt_nsp2.alt_ts_prs2
693729
DROP USER regress_alter_generic_user1;
694730
DROP USER regress_alter_generic_user2;
695731
DROP USER regress_alter_generic_user3;

src/test/regress/expected/collate.out

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,6 +681,22 @@ SELECT collation for ((SELECT b FROM collate_test1 LIMIT 1));
681681
-- trying to run any platform-specific collation tests later, so we
682682
-- must get rid of them.
683683
--
684-
\set VERBOSITY terse
685684
DROP SCHEMA collate_tests CASCADE;
686685
NOTICE: drop cascades to 17 other objects
686+
DETAIL: drop cascades to table collate_test1
687+
drop cascades to table collate_test_like
688+
drop cascades to table collate_test2
689+
drop cascades to type testdomain_p
690+
drop cascades to table collate_test4
691+
drop cascades to table collate_test5
692+
drop cascades to table collate_test10
693+
drop cascades to view collview1
694+
drop cascades to view collview2
695+
drop cascades to view collview3
696+
drop cascades to type testdomain
697+
drop cascades to function dup(anyelement)
698+
drop cascades to table collate_test20
699+
drop cascades to table collate_test21
700+
drop cascades to table collate_test22
701+
drop cascades to collation mycoll2
702+
drop cascades to table collate_test23

src/test/regress/expected/create_function_3.out

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,9 +341,28 @@ SELECT * FROM voidtest5(3);
341341
(0 rows)
342342

343343
-- Cleanup
344-
\set VERBOSITY terse \\ -- suppress cascade details
345344
DROP SCHEMA temp_func_test CASCADE;
346345
NOTICE: drop cascades to 21 other objects
347-
\set VERBOSITY default
346+
DETAIL: drop cascades to function functest_a_1(text,date)
347+
drop cascades to function functest_a_2(text[])
348+
drop cascades to function functest_a_3()
349+
drop cascades to function functest_b_2(integer)
350+
drop cascades to function functest_b_3(integer)
351+
drop cascades to function functest_b_4(integer)
352+
drop cascades to function functest_c_1(integer)
353+
drop cascades to function functest_c_2(integer)
354+
drop cascades to function functest_c_3(integer)
355+
drop cascades to function functest_e_1(integer)
356+
drop cascades to function functest_e_2(integer)
357+
drop cascades to function functest_f_1(integer)
358+
drop cascades to function functest_f_2(integer)
359+
drop cascades to function functest_f_3(integer)
360+
drop cascades to function functest_f_4(integer)
361+
drop cascades to function functest_b_2(bigint)
362+
drop cascades to function voidtest1(integer)
363+
drop cascades to function voidtest2(integer,integer)
364+
drop cascades to function voidtest3(integer)
365+
drop cascades to function voidtest4(integer)
366+
drop cascades to function voidtest5(integer)
348367
DROP USER regress_unpriv_user;
349368
RESET search_path;

src/test/regress/expected/create_index.out

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3244,9 +3244,10 @@ INSERT INTO delete_test_table SELECT i, 1, 2, 3 FROM generate_series(1,1000) i;
32443244
-- REINDEX (VERBOSE)
32453245
--
32463246
CREATE TABLE reindex_verbose(id integer primary key);
3247-
\set VERBOSITY terse
3247+
\set VERBOSITY terse \\ -- suppress machine-dependent details
32483248
REINDEX (VERBOSE) TABLE reindex_verbose;
32493249
INFO: index "reindex_verbose_pkey" was reindexed
3250+
\set VERBOSITY default
32503251
DROP TABLE reindex_verbose;
32513252
--
32523253
-- REINDEX SCHEMA
@@ -3315,6 +3316,11 @@ ERROR: must be owner of schema schema_to_reindex
33153316
-- Clean up
33163317
RESET ROLE;
33173318
DROP ROLE regress_reindexuser;
3318-
\set VERBOSITY terse \\ -- suppress cascade details
33193319
DROP SCHEMA schema_to_reindex CASCADE;
33203320
NOTICE: drop cascades to 6 other objects
3321+
DETAIL: drop cascades to table table1
3322+
drop cascades to table table2
3323+
drop cascades to materialized view matview
3324+
drop cascades to view view
3325+
drop cascades to table reindex_before
3326+
drop cascades to table reindex_after

src/test/regress/expected/create_view.out

Lines changed: 89 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1717,8 +1717,96 @@ select pg_get_ruledef(oid, true) from pg_rewrite
17171717
(1 row)
17181718

17191719
-- clean up all the random objects we made above
1720-
\set VERBOSITY terse \\ -- suppress cascade details
17211720
DROP SCHEMA temp_view_test CASCADE;
17221721
NOTICE: drop cascades to 27 other objects
1722+
DETAIL: drop cascades to table temp_view_test.base_table
1723+
drop cascades to view v2_temp
1724+
drop cascades to view v4_temp
1725+
drop cascades to view v6_temp
1726+
drop cascades to view v7_temp
1727+
drop cascades to view v10_temp
1728+
drop cascades to view v8_temp
1729+
drop cascades to view v9_temp
1730+
drop cascades to view v11_temp
1731+
drop cascades to view v12_temp
1732+
drop cascades to table temp_view_test.base_table2
1733+
drop cascades to view v5_temp
1734+
drop cascades to view temp_view_test.v1
1735+
drop cascades to view temp_view_test.v2
1736+
drop cascades to view temp_view_test.v3
1737+
drop cascades to view temp_view_test.v4
1738+
drop cascades to view temp_view_test.v5
1739+
drop cascades to view temp_view_test.v6
1740+
drop cascades to view temp_view_test.v7
1741+
drop cascades to view temp_view_test.v8
1742+
drop cascades to sequence temp_view_test.seq1
1743+
drop cascades to view temp_view_test.v9
1744+
drop cascades to table temp_view_test.tx1
1745+
drop cascades to view aliased_view_1
1746+
drop cascades to view aliased_view_2
1747+
drop cascades to view aliased_view_3
1748+
drop cascades to view aliased_view_4
17231749
DROP SCHEMA testviewschm2 CASCADE;
17241750
NOTICE: drop cascades to 62 other objects
1751+
DETAIL: drop cascades to table t1
1752+
drop cascades to view temporal1
1753+
drop cascades to view temporal2
1754+
drop cascades to view temporal3
1755+
drop cascades to view temporal4
1756+
drop cascades to table t2
1757+
drop cascades to view nontemp1
1758+
drop cascades to view nontemp2
1759+
drop cascades to view nontemp3
1760+
drop cascades to view nontemp4
1761+
drop cascades to table tbl1
1762+
drop cascades to table tbl2
1763+
drop cascades to table tbl3
1764+
drop cascades to table tbl4
1765+
drop cascades to view mytempview
1766+
drop cascades to view pubview
1767+
drop cascades to view mysecview1
1768+
drop cascades to view mysecview2
1769+
drop cascades to view mysecview3
1770+
drop cascades to view mysecview4
1771+
drop cascades to view unspecified_types
1772+
drop cascades to table tt1
1773+
drop cascades to table tx1
1774+
drop cascades to table tt2
1775+
drop cascades to table tt3
1776+
drop cascades to table tt4
1777+
drop cascades to view v1
1778+
drop cascades to view v1a
1779+
drop cascades to view v2
1780+
drop cascades to view v2a
1781+
drop cascades to view v3
1782+
drop cascades to table tt5
1783+
drop cascades to table tt6
1784+
drop cascades to view vv1
1785+
drop cascades to table tt7
1786+
drop cascades to table tt8
1787+
drop cascades to view vv2
1788+
drop cascades to view vv3
1789+
drop cascades to view vv4
1790+
drop cascades to table tt7a
1791+
drop cascades to table tt8a
1792+
drop cascades to view vv2a
1793+
drop cascades to table tt9
1794+
drop cascades to table tt10
1795+
drop cascades to view vv5
1796+
drop cascades to table tt11
1797+
drop cascades to table tt12
1798+
drop cascades to table tt13
1799+
drop cascades to view vv6
1800+
drop cascades to table tt14t
1801+
drop cascades to function tt14f()
1802+
drop cascades to view tt14v
1803+
drop cascades to type nestedcomposite
1804+
drop cascades to view tt15v
1805+
drop cascades to view tt16v
1806+
drop cascades to view tt17v
1807+
drop cascades to view tt18v
1808+
drop cascades to view tt19v
1809+
drop cascades to view tt20v
1810+
drop cascades to view tt21v
1811+
drop cascades to view tt22v
1812+
drop cascades to view tt23v

src/test/regress/expected/dependency.out

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,17 @@ privileges for table deptest1
133133
owner of default privileges on new relations belonging to role regress_dep_user1 in schema deptest
134134
DROP OWNED BY regress_dep_user1;
135135
DROP USER regress_dep_user1;
136-
\set VERBOSITY terse
137136
DROP USER regress_dep_user2;
138137
ERROR: role "regress_dep_user2" cannot be dropped because some objects depend on it
138+
DETAIL: owner of schema deptest
139+
owner of sequence deptest_a_seq
140+
owner of table deptest
141+
owner of function deptest_func()
142+
owner of type deptest_enum
143+
owner of type deptest_range
144+
owner of table deptest2
145+
owner of sequence ss1
146+
owner of type deptest_t
139147
DROP OWNED BY regress_dep_user2, regress_dep_user0;
140148
DROP USER regress_dep_user2;
141149
DROP USER regress_dep_user0;

src/test/regress/expected/event_trigger.out

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,11 +185,11 @@ alter event trigger regress_event_trigger rename to regress_event_trigger3;
185185
drop event trigger regress_event_trigger;
186186
ERROR: event trigger "regress_event_trigger" does not exist
187187
-- should fail, regress_evt_user owns some objects
188-
-- use terse mode to avoid ordering issues in DROP ROLE detail output
189-
\set VERBOSITY terse
190188
drop role regress_evt_user;
191189
ERROR: role "regress_evt_user" cannot be dropped because some objects depend on it
192-
\set VERBOSITY default
190+
DETAIL: owner of event trigger regress_event_trigger3
191+
owner of user mapping for regress_evt_user on server useless_server
192+
owner of default privileges on new relations belonging to role regress_evt_user
193193
-- cleanup before next test
194194
-- these are all OK; the second one should emit a NOTICE
195195
drop event trigger if exists regress_event_trigger2;

src/test/regress/expected/float4-misrounded-input.out

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -931,8 +931,11 @@ select float4send(flt) as ibits,
931931
(261 rows)
932932

933933
-- clean up, lest opr_sanity complain
934-
\set VERBOSITY terse
935934
drop type xfloat4 cascade;
936935
NOTICE: drop cascades to 6 other objects
937-
\set VERBOSITY default
938-
--
936+
DETAIL: drop cascades to function xfloat4in(cstring)
937+
drop cascades to function xfloat4out(xfloat4)
938+
drop cascades to cast from xfloat4 to real
939+
drop cascades to cast from real to xfloat4
940+
drop cascades to cast from xfloat4 to integer
941+
drop cascades to cast from integer to xfloat4

src/test/regress/expected/float4.out

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -931,8 +931,11 @@ select float4send(flt) as ibits,
931931
(261 rows)
932932

933933
-- clean up, lest opr_sanity complain
934-
\set VERBOSITY terse
935934
drop type xfloat4 cascade;
936935
NOTICE: drop cascades to 6 other objects
937-
\set VERBOSITY default
938-
--
936+
DETAIL: drop cascades to function xfloat4in(cstring)
937+
drop cascades to function xfloat4out(xfloat4)
938+
drop cascades to cast from xfloat4 to real
939+
drop cascades to cast from real to xfloat4
940+
drop cascades to cast from xfloat4 to integer
941+
drop cascades to cast from integer to xfloat4

src/test/regress/expected/float8.out

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1197,8 +1197,11 @@ select float8send(flt) as ibits,
11971197
(209 rows)
11981198

11991199
-- clean up, lest opr_sanity complain
1200-
\set VERBOSITY terse
12011200
drop type xfloat8 cascade;
12021201
NOTICE: drop cascades to 6 other objects
1203-
\set VERBOSITY default
1204-
--
1202+
DETAIL: drop cascades to function xfloat8in(cstring)
1203+
drop cascades to function xfloat8out(xfloat8)
1204+
drop cascades to cast from xfloat8 to double precision
1205+
drop cascades to cast from double precision to xfloat8
1206+
drop cascades to cast from xfloat8 to bigint
1207+
drop cascades to cast from bigint to xfloat8

src/test/regress/expected/foreign_data.out

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -439,11 +439,10 @@ GRANT USAGE ON FOREIGN DATA WRAPPER foo TO regress_test_indirect;
439439
SET ROLE regress_test_role;
440440
ALTER SERVER s1 OWNER TO regress_test_indirect;
441441
RESET ROLE;
442-
-- We use terse mode to avoid ordering issues in DROP ROLE detail output
443-
\set VERBOSITY terse
444442
DROP ROLE regress_test_indirect; -- ERROR
445443
ERROR: role "regress_test_indirect" cannot be dropped because some objects depend on it
446-
\set VERBOSITY default
444+
DETAIL: privileges for foreign-data wrapper foo
445+
owner of server s1
447446
\des+
448447
List of foreign servers
449448
Name | Owner | Foreign-data wrapper | Access privileges | Type | Version | FDW options | Description
@@ -1204,10 +1203,10 @@ ERROR: permission denied for foreign-data wrapper foo
12041203
ALTER SERVER s9 VERSION '1.1';
12051204
GRANT USAGE ON FOREIGN SERVER s9 TO regress_test_role;
12061205
CREATE USER MAPPING FOR current_user SERVER s9;
1207-
\set VERBOSITY terse
12081206
DROP SERVER s9 CASCADE;
12091207
NOTICE: drop cascades to 2 other objects
1210-
\set VERBOSITY default
1208+
DETAIL: drop cascades to user mapping for public on server s9
1209+
drop cascades to user mapping for regress_unprivileged_role on server s9
12111210
RESET ROLE;
12121211
CREATE SERVER s9 FOREIGN DATA WRAPPER foo;
12131212
GRANT USAGE ON FOREIGN SERVER s9 TO regress_unprivileged_role;
@@ -1275,10 +1274,10 @@ SET ROLE regress_unprivileged_role;
12751274
(9 rows)
12761275

12771276
RESET ROLE;
1278-
\set VERBOSITY terse
12791277
DROP SERVER s10 CASCADE;
12801278
NOTICE: drop cascades to 2 other objects
1281-
\set VERBOSITY default
1279+
DETAIL: drop cascades to user mapping for public on server s10
1280+
drop cascades to user mapping for regress_unprivileged_role on server s10
12821281
-- Triggers
12831282
CREATE FUNCTION dummy_trigger() RETURNS TRIGGER AS $$
12841283
BEGIN
@@ -1620,12 +1619,15 @@ Inherits: fd_pt1
16201619
Child tables: ct3,
16211620
ft3
16221621

1623-
\set VERBOSITY terse
16241622
DROP FOREIGN TABLE ft2; -- ERROR
16251623
ERROR: cannot drop foreign table ft2 because other objects depend on it
1624+
DETAIL: table ct3 depends on foreign table ft2
1625+
foreign table ft3 depends on foreign table ft2
1626+
HINT: Use DROP ... CASCADE to drop the dependent objects too.
16261627
DROP FOREIGN TABLE ft2 CASCADE;
16271628
NOTICE: drop cascades to 2 other objects
1628-
\set VERBOSITY default
1629+
DETAIL: drop cascades to table ct3
1630+
drop cascades to foreign table ft3
16291631
CREATE FOREIGN TABLE ft2 (
16301632
c1 integer NOT NULL,
16311633
c2 text,
@@ -1995,18 +1997,26 @@ ERROR: cannot attach a permanent relation as partition of temporary relation "t
19951997
DROP FOREIGN TABLE foreign_part;
19961998
DROP TABLE temp_parted;
19971999
-- Cleanup
1998-
\set VERBOSITY terse
19992000
DROP SCHEMA foreign_schema CASCADE;
20002001
DROP ROLE regress_test_role; -- ERROR
20012002
ERROR: role "regress_test_role" cannot be dropped because some objects depend on it
2003+
DETAIL: privileges for foreign-data wrapper foo
2004+
privileges for server s4
2005+
owner of user mapping for regress_test_role on server s6
20022006
DROP SERVER t1 CASCADE;
20032007
NOTICE: drop cascades to user mapping for public on server t1
20042008
DROP USER MAPPING FOR regress_test_role SERVER s6;
20052009
DROP FOREIGN DATA WRAPPER foo CASCADE;
20062010
NOTICE: drop cascades to 5 other objects
2011+
DETAIL: drop cascades to server s4
2012+
drop cascades to user mapping for regress_foreign_data_user on server s4
2013+
drop cascades to server s6
2014+
drop cascades to server s9
2015+
drop cascades to user mapping for regress_unprivileged_role on server s9
20072016
DROP SERVER s8 CASCADE;
20082017
NOTICE: drop cascades to 2 other objects
2009-
\set VERBOSITY default
2018+
DETAIL: drop cascades to user mapping for regress_foreign_data_user on server s8
2019+
drop cascades to user mapping for public on server s8
20102020
DROP ROLE regress_test_indirect;
20112021
DROP ROLE regress_test_role;
20122022
DROP ROLE regress_unprivileged_role; -- ERROR

0 commit comments

Comments
 (0)