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

Commit 27a3b2a

Browse files
committed
Add pg_dump test for triggers on partitioned tables
This currently works, but add this test to ensure it continues to work. Lack of this test became evident after a recent bugfix submission that would have inadvertently broken it, in https://postgr.es/m/CA+HiwqFM2=i+uHB9o4OkLbE2S3sjPHoVe2wXuAD1GLJ4+Pk9eg@mail.gmail.com
1 parent a9760d0 commit 27a3b2a

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

src/bin/pg_dump/t/002_pg_dump.pl

+26
Original file line numberDiff line numberDiff line change
@@ -2377,6 +2377,32 @@
23772377
},
23782378
},
23792379
2380+
'Creation of row-level trigger in partitioned table' => {
2381+
create_order => 92,
2382+
create_sql => 'CREATE TRIGGER test_trigger
2383+
AFTER INSERT ON dump_test.measurement
2384+
FOR EACH ROW EXECUTE PROCEDURE dump_test.trigger_func()',
2385+
regexp => qr/^
2386+
\QCREATE TRIGGER test_trigger AFTER INSERT ON dump_test.measurement \E
2387+
\QFOR EACH ROW \E
2388+
\QEXECUTE FUNCTION dump_test.trigger_func();\E
2389+
/xm,
2390+
like => {
2391+
%full_runs, %dump_test_schema_runs, section_post_data => 1,
2392+
},
2393+
unlike => {
2394+
exclude_dump_test_schema => 1,
2395+
},
2396+
},
2397+
2398+
# this shouldn't ever get emitted
2399+
'Creation of row-level trigger in partition' => {
2400+
regexp => qr/^
2401+
\QCREATE TRIGGER test_trigger AFTER INSERT ON dump_test_second_schema.measurement\E
2402+
/xm,
2403+
like => {},
2404+
},
2405+
23802406
'CREATE TABLE test_fourth_table_zero_col' => {
23812407
create_order => 6,
23822408
create_sql => 'CREATE TABLE dump_test.test_fourth_table (

0 commit comments

Comments
 (0)