Skip to content

Commit 381a14d

Browse files
author
Alexander Korotkov
committed
Make tests oid-agnostic.
1 parent 22d6ee5 commit 381a14d

File tree

2 files changed

+34
-34
lines changed

2 files changed

+34
-34
lines changed

contrib/pg_pathman/expected/insert_trigger.out

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@ create_range_partitions
77
step s1b: BEGIN;
88
step s1_insert_150: INSERT INTO range_rel SELECT generate_series(1, 150);
99
step s1r: ROLLBACK;
10-
step s1_show_partitions: SELECT * FROM pg_inherits WHERE inhparent = 'range_rel'::regclass::oid;
11-
inhrelid inhparent inhseqno
10+
step s1_show_partitions: SELECT c.consrc FROM pg_inherits i LEFT JOIN pg_constraint c ON c.conrelid = i.inhrelid AND c.consrc IS NOT NULL WHERE i.inhparent = 'range_rel'::regclass::oid;
11+
consrc
1212

13-
16453 16445 1
14-
16462 16445 1
13+
((id >= 1) AND (id < 101))
14+
((id >= 101) AND (id < 201))
1515
step s2b: BEGIN;
1616
step s2_insert_150: INSERT INTO range_rel SELECT generate_series(1, 150);
1717
step s2c: COMMIT;
18-
step s2_show_partitions: SELECT * FROM pg_inherits WHERE inhparent = 'range_rel'::regclass::oid;
19-
inhrelid inhparent inhseqno
18+
step s2_show_partitions: SELECT c.consrc FROM pg_inherits i LEFT JOIN pg_constraint c ON c.conrelid = i.inhrelid AND c.consrc IS NOT NULL WHERE i.inhparent = 'range_rel'::regclass::oid;
19+
consrc
2020

21-
16453 16445 1
22-
16462 16445 1
21+
((id >= 1) AND (id < 101))
22+
((id >= 101) AND (id < 201))
2323

2424
starting permutation: s1b s1_insert_150 s1r s1_show_partitions s2b s2_insert_300 s2c s2_show_partitions
2525
create_range_partitions
@@ -28,20 +28,20 @@ create_range_partitions
2828
step s1b: BEGIN;
2929
step s1_insert_150: INSERT INTO range_rel SELECT generate_series(1, 150);
3030
step s1r: ROLLBACK;
31-
step s1_show_partitions: SELECT * FROM pg_inherits WHERE inhparent = 'range_rel'::regclass::oid;
32-
inhrelid inhparent inhseqno
31+
step s1_show_partitions: SELECT c.consrc FROM pg_inherits i LEFT JOIN pg_constraint c ON c.conrelid = i.inhrelid AND c.consrc IS NOT NULL WHERE i.inhparent = 'range_rel'::regclass::oid;
32+
consrc
3333

34-
16537 16529 1
35-
16545 16529 1
34+
((id >= 1) AND (id < 101))
35+
((id >= 101) AND (id < 201))
3636
step s2b: BEGIN;
3737
step s2_insert_300: INSERT INTO range_rel SELECT generate_series(151, 300);
3838
step s2c: COMMIT;
39-
step s2_show_partitions: SELECT * FROM pg_inherits WHERE inhparent = 'range_rel'::regclass::oid;
40-
inhrelid inhparent inhseqno
39+
step s2_show_partitions: SELECT c.consrc FROM pg_inherits i LEFT JOIN pg_constraint c ON c.conrelid = i.inhrelid AND c.consrc IS NOT NULL WHERE i.inhparent = 'range_rel'::regclass::oid;
40+
consrc
4141

42-
16537 16529 1
43-
16545 16529 1
44-
16552 16529 1
42+
((id >= 1) AND (id < 101))
43+
((id >= 101) AND (id < 201))
44+
((id >= 201) AND (id < 301))
4545

4646
starting permutation: s1b s1_insert_300 s1r s1_show_partitions s2b s2_insert_150 s2c s2_show_partitions
4747
create_range_partitions
@@ -50,21 +50,21 @@ create_range_partitions
5050
step s1b: BEGIN;
5151
step s1_insert_300: INSERT INTO range_rel SELECT generate_series(151, 300);
5252
step s1r: ROLLBACK;
53-
step s1_show_partitions: SELECT * FROM pg_inherits WHERE inhparent = 'range_rel'::regclass::oid;
54-
inhrelid inhparent inhseqno
53+
step s1_show_partitions: SELECT c.consrc FROM pg_inherits i LEFT JOIN pg_constraint c ON c.conrelid = i.inhrelid AND c.consrc IS NOT NULL WHERE i.inhparent = 'range_rel'::regclass::oid;
54+
consrc
5555

56-
16627 16619 1
57-
16635 16619 1
58-
16642 16619 1
56+
((id >= 1) AND (id < 101))
57+
((id >= 101) AND (id < 201))
58+
((id >= 201) AND (id < 301))
5959
step s2b: BEGIN;
6060
step s2_insert_150: INSERT INTO range_rel SELECT generate_series(1, 150);
6161
step s2c: COMMIT;
62-
step s2_show_partitions: SELECT * FROM pg_inherits WHERE inhparent = 'range_rel'::regclass::oid;
63-
inhrelid inhparent inhseqno
62+
step s2_show_partitions: SELECT c.consrc FROM pg_inherits i LEFT JOIN pg_constraint c ON c.conrelid = i.inhrelid AND c.consrc IS NOT NULL WHERE i.inhparent = 'range_rel'::regclass::oid;
63+
consrc
6464

65-
16627 16619 1
66-
16635 16619 1
67-
16642 16619 1
65+
((id >= 1) AND (id < 101))
66+
((id >= 101) AND (id < 201))
67+
((id >= 201) AND (id < 301))
6868

6969
starting permutation: s1b s1_insert_150 s2b s2_insert_300 s1r s2r s2_show_partitions
7070
create_range_partitions
@@ -76,9 +76,9 @@ step s2b: BEGIN;
7676
step s2_insert_300: INSERT INTO range_rel SELECT generate_series(151, 300);
7777
step s1r: ROLLBACK;
7878
step s2r: ROLLBACK;
79-
step s2_show_partitions: SELECT * FROM pg_inherits WHERE inhparent = 'range_rel'::regclass::oid;
80-
inhrelid inhparent inhseqno
79+
step s2_show_partitions: SELECT c.consrc FROM pg_inherits i LEFT JOIN pg_constraint c ON c.conrelid = i.inhrelid AND c.consrc IS NOT NULL WHERE i.inhparent = 'range_rel'::regclass::oid;
80+
consrc
8181

82-
16717 16709 1
83-
16725 16709 1
84-
16732 16709 1
82+
((id >= 1) AND (id < 101))
83+
((id >= 101) AND (id < 201))
84+
((id >= 201) AND (id < 301))

contrib/pg_pathman/specs/insert_trigger.spec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ session "s1"
1616
step "s1b" { BEGIN; }
1717
step "s1_insert_150" { INSERT INTO range_rel SELECT generate_series(1, 150); }
1818
step "s1_insert_300" { INSERT INTO range_rel SELECT generate_series(151, 300); }
19-
step "s1_show_partitions" { SELECT * FROM pg_inherits WHERE inhparent = 'range_rel'::regclass::oid; }
19+
step "s1_show_partitions" { SELECT c.consrc FROM pg_inherits i LEFT JOIN pg_constraint c ON c.conrelid = i.inhrelid AND c.consrc IS NOT NULL WHERE i.inhparent = 'range_rel'::regclass::oid; }
2020
step "s1r" { ROLLBACK; }
2121
step "s1c" { COMMIT; }
2222

2323
session "s2"
2424
step "s2b" { BEGIN; }
2525
step "s2_insert_150" { INSERT INTO range_rel SELECT generate_series(1, 150); }
2626
step "s2_insert_300" { INSERT INTO range_rel SELECT generate_series(151, 300); }
27-
step "s2_show_partitions" { SELECT * FROM pg_inherits WHERE inhparent = 'range_rel'::regclass::oid; }
27+
step "s2_show_partitions" { SELECT c.consrc FROM pg_inherits i LEFT JOIN pg_constraint c ON c.conrelid = i.inhrelid AND c.consrc IS NOT NULL WHERE i.inhparent = 'range_rel'::regclass::oid; }
2828
step "s2r" { ROLLBACK; }
2929
step "s2c" { COMMIT; }
3030

0 commit comments

Comments
 (0)