Skip to content

Commit 68f785f

Browse files
committed
Make the new partition regression tests locale-independent.
The order of partitions listed by \d+ is in general locale-dependent. Rename the partitions in the test added by d363d42 to force them to be listed in a consistent order.
1 parent d363d42 commit 68f785f

File tree

2 files changed

+61
-61
lines changed

2 files changed

+61
-61
lines changed

src/test/regress/expected/insert.out

+45-45
Original file line numberDiff line numberDiff line change
@@ -528,95 +528,95 @@ drop table brtrigpartcon;
528528
drop function brtrigpartcon1trigf();
529529
-- check multi-column range partitioning with minvalue/maxvalue constraints
530530
create table mcrparted (a text, b int) partition by range(a, b);
531-
create table mcrparted_lt_b partition of mcrparted for values from (minvalue, 0) to ('b', minvalue);
532-
create table mcrparted_b partition of mcrparted for values from ('b', minvalue) to ('c', minvalue);
533-
create table mcrparted_c_to_common partition of mcrparted for values from ('c', minvalue) to ('common', minvalue);
534-
create table mcrparted_common_lt_0 partition of mcrparted for values from ('common', minvalue) to ('common', 0);
535-
create table mcrparted_common_0_to_10 partition of mcrparted for values from ('common', 0) to ('common', 10);
536-
create table mcrparted_common_ge_10 partition of mcrparted for values from ('common', 10) to ('common', maxvalue);
537-
create table mcrparted_gt_common_lt_d partition of mcrparted for values from ('common', maxvalue) to ('d', minvalue);
538-
create table mcrparted_ge_d partition of mcrparted for values from ('d', minvalue) to (maxvalue, 0);
531+
create table mcrparted1_lt_b partition of mcrparted for values from (minvalue, 0) to ('b', minvalue);
532+
create table mcrparted2_b partition of mcrparted for values from ('b', minvalue) to ('c', minvalue);
533+
create table mcrparted3_c_to_common partition of mcrparted for values from ('c', minvalue) to ('common', minvalue);
534+
create table mcrparted4_common_lt_0 partition of mcrparted for values from ('common', minvalue) to ('common', 0);
535+
create table mcrparted5_common_0_to_10 partition of mcrparted for values from ('common', 0) to ('common', 10);
536+
create table mcrparted6_common_ge_10 partition of mcrparted for values from ('common', 10) to ('common', maxvalue);
537+
create table mcrparted7_gt_common_lt_d partition of mcrparted for values from ('common', maxvalue) to ('d', minvalue);
538+
create table mcrparted8_ge_d partition of mcrparted for values from ('d', minvalue) to (maxvalue, 0);
539539
\d+ mcrparted
540540
Table "public.mcrparted"
541541
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description
542542
--------+---------+-----------+----------+---------+----------+--------------+-------------
543543
a | text | | | | extended | |
544544
b | integer | | | | plain | |
545545
Partition key: RANGE (a, b)
546-
Partitions: mcrparted_b FOR VALUES FROM ('b', MINVALUE) TO ('c', MINVALUE),
547-
mcrparted_common_0_to_10 FOR VALUES FROM ('common', 0) TO ('common', 10),
548-
mcrparted_common_ge_10 FOR VALUES FROM ('common', 10) TO ('common', MAXVALUE),
549-
mcrparted_common_lt_0 FOR VALUES FROM ('common', MINVALUE) TO ('common', 0),
550-
mcrparted_c_to_common FOR VALUES FROM ('c', MINVALUE) TO ('common', MINVALUE),
551-
mcrparted_ge_d FOR VALUES FROM ('d', MINVALUE) TO (MAXVALUE, 0),
552-
mcrparted_gt_common_lt_d FOR VALUES FROM ('common', MAXVALUE) TO ('d', MINVALUE),
553-
mcrparted_lt_b FOR VALUES FROM (MINVALUE, 0) TO ('b', MINVALUE)
546+
Partitions: mcrparted1_lt_b FOR VALUES FROM (MINVALUE, 0) TO ('b', MINVALUE),
547+
mcrparted2_b FOR VALUES FROM ('b', MINVALUE) TO ('c', MINVALUE),
548+
mcrparted3_c_to_common FOR VALUES FROM ('c', MINVALUE) TO ('common', MINVALUE),
549+
mcrparted4_common_lt_0 FOR VALUES FROM ('common', MINVALUE) TO ('common', 0),
550+
mcrparted5_common_0_to_10 FOR VALUES FROM ('common', 0) TO ('common', 10),
551+
mcrparted6_common_ge_10 FOR VALUES FROM ('common', 10) TO ('common', MAXVALUE),
552+
mcrparted7_gt_common_lt_d FOR VALUES FROM ('common', MAXVALUE) TO ('d', MINVALUE),
553+
mcrparted8_ge_d FOR VALUES FROM ('d', MINVALUE) TO (MAXVALUE, 0)
554554

555-
\d+ mcrparted_lt_b
556-
Table "public.mcrparted_lt_b"
555+
\d+ mcrparted1_lt_b
556+
Table "public.mcrparted1_lt_b"
557557
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description
558558
--------+---------+-----------+----------+---------+----------+--------------+-------------
559559
a | text | | | | extended | |
560560
b | integer | | | | plain | |
561561
Partition of: mcrparted FOR VALUES FROM (MINVALUE, 0) TO ('b', MINVALUE)
562562
Partition constraint: ((a IS NOT NULL) AND (b IS NOT NULL) AND (a < 'b'::text))
563563

564-
\d+ mcrparted_b
565-
Table "public.mcrparted_b"
564+
\d+ mcrparted2_b
565+
Table "public.mcrparted2_b"
566566
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description
567567
--------+---------+-----------+----------+---------+----------+--------------+-------------
568568
a | text | | | | extended | |
569569
b | integer | | | | plain | |
570570
Partition of: mcrparted FOR VALUES FROM ('b', MINVALUE) TO ('c', MINVALUE)
571571
Partition constraint: ((a IS NOT NULL) AND (b IS NOT NULL) AND (a >= 'b'::text) AND (a < 'c'::text))
572572

573-
\d+ mcrparted_c_to_common
574-
Table "public.mcrparted_c_to_common"
573+
\d+ mcrparted3_c_to_common
574+
Table "public.mcrparted3_c_to_common"
575575
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description
576576
--------+---------+-----------+----------+---------+----------+--------------+-------------
577577
a | text | | | | extended | |
578578
b | integer | | | | plain | |
579579
Partition of: mcrparted FOR VALUES FROM ('c', MINVALUE) TO ('common', MINVALUE)
580580
Partition constraint: ((a IS NOT NULL) AND (b IS NOT NULL) AND (a >= 'c'::text) AND (a < 'common'::text))
581581

582-
\d+ mcrparted_common_lt_0
583-
Table "public.mcrparted_common_lt_0"
582+
\d+ mcrparted4_common_lt_0
583+
Table "public.mcrparted4_common_lt_0"
584584
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description
585585
--------+---------+-----------+----------+---------+----------+--------------+-------------
586586
a | text | | | | extended | |
587587
b | integer | | | | plain | |
588588
Partition of: mcrparted FOR VALUES FROM ('common', MINVALUE) TO ('common', 0)
589589
Partition constraint: ((a IS NOT NULL) AND (b IS NOT NULL) AND (a = 'common'::text) AND (b < 0))
590590

591-
\d+ mcrparted_common_0_to_10
592-
Table "public.mcrparted_common_0_to_10"
591+
\d+ mcrparted5_common_0_to_10
592+
Table "public.mcrparted5_common_0_to_10"
593593
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description
594594
--------+---------+-----------+----------+---------+----------+--------------+-------------
595595
a | text | | | | extended | |
596596
b | integer | | | | plain | |
597597
Partition of: mcrparted FOR VALUES FROM ('common', 0) TO ('common', 10)
598598
Partition constraint: ((a IS NOT NULL) AND (b IS NOT NULL) AND (a = 'common'::text) AND (b >= 0) AND (b < 10))
599599

600-
\d+ mcrparted_common_ge_10
601-
Table "public.mcrparted_common_ge_10"
600+
\d+ mcrparted6_common_ge_10
601+
Table "public.mcrparted6_common_ge_10"
602602
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description
603603
--------+---------+-----------+----------+---------+----------+--------------+-------------
604604
a | text | | | | extended | |
605605
b | integer | | | | plain | |
606606
Partition of: mcrparted FOR VALUES FROM ('common', 10) TO ('common', MAXVALUE)
607607
Partition constraint: ((a IS NOT NULL) AND (b IS NOT NULL) AND (a = 'common'::text) AND (b >= 10))
608608

609-
\d+ mcrparted_gt_common_lt_d
610-
Table "public.mcrparted_gt_common_lt_d"
609+
\d+ mcrparted7_gt_common_lt_d
610+
Table "public.mcrparted7_gt_common_lt_d"
611611
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description
612612
--------+---------+-----------+----------+---------+----------+--------------+-------------
613613
a | text | | | | extended | |
614614
b | integer | | | | plain | |
615615
Partition of: mcrparted FOR VALUES FROM ('common', MAXVALUE) TO ('d', MINVALUE)
616616
Partition constraint: ((a IS NOT NULL) AND (b IS NOT NULL) AND (a > 'common'::text) AND (a < 'd'::text))
617617

618-
\d+ mcrparted_ge_d
619-
Table "public.mcrparted_ge_d"
618+
\d+ mcrparted8_ge_d
619+
Table "public.mcrparted8_ge_d"
620620
Column | Type | Collation | Nullable | Default | Storage | Stats target | Description
621621
--------+---------+-----------+----------+---------+----------+--------------+-------------
622622
a | text | | | | extended | |
@@ -628,19 +628,19 @@ insert into mcrparted values ('aaa', 0), ('b', 0), ('bz', 10), ('c', -10),
628628
('comm', -10), ('common', -10), ('common', 0), ('common', 10),
629629
('commons', 0), ('d', -10), ('e', 0);
630630
select tableoid::regclass, * from mcrparted order by a, b;
631-
tableoid | a | b
632-
--------------------------+---------+-----
633-
mcrparted_lt_b | aaa | 0
634-
mcrparted_b | b | 0
635-
mcrparted_b | bz | 10
636-
mcrparted_c_to_common | c | -10
637-
mcrparted_c_to_common | comm | -10
638-
mcrparted_common_lt_0 | common | -10
639-
mcrparted_common_0_to_10 | common | 0
640-
mcrparted_common_ge_10 | common | 10
641-
mcrparted_gt_common_lt_d | commons | 0
642-
mcrparted_ge_d | d | -10
643-
mcrparted_ge_d | e | 0
631+
tableoid | a | b
632+
---------------------------+---------+-----
633+
mcrparted1_lt_b | aaa | 0
634+
mcrparted2_b | b | 0
635+
mcrparted2_b | bz | 10
636+
mcrparted3_c_to_common | c | -10
637+
mcrparted3_c_to_common | comm | -10
638+
mcrparted4_common_lt_0 | common | -10
639+
mcrparted5_common_0_to_10 | common | 0
640+
mcrparted6_common_ge_10 | common | 10
641+
mcrparted7_gt_common_lt_d | commons | 0
642+
mcrparted8_ge_d | d | -10
643+
mcrparted8_ge_d | e | 0
644644
(11 rows)
645645

646646
drop table mcrparted;

src/test/regress/sql/insert.sql

+16-16
Original file line numberDiff line numberDiff line change
@@ -363,24 +363,24 @@ drop function brtrigpartcon1trigf();
363363

364364
-- check multi-column range partitioning with minvalue/maxvalue constraints
365365
create table mcrparted (a text, b int) partition by range(a, b);
366-
create table mcrparted_lt_b partition of mcrparted for values from (minvalue, 0) to ('b', minvalue);
367-
create table mcrparted_b partition of mcrparted for values from ('b', minvalue) to ('c', minvalue);
368-
create table mcrparted_c_to_common partition of mcrparted for values from ('c', minvalue) to ('common', minvalue);
369-
create table mcrparted_common_lt_0 partition of mcrparted for values from ('common', minvalue) to ('common', 0);
370-
create table mcrparted_common_0_to_10 partition of mcrparted for values from ('common', 0) to ('common', 10);
371-
create table mcrparted_common_ge_10 partition of mcrparted for values from ('common', 10) to ('common', maxvalue);
372-
create table mcrparted_gt_common_lt_d partition of mcrparted for values from ('common', maxvalue) to ('d', minvalue);
373-
create table mcrparted_ge_d partition of mcrparted for values from ('d', minvalue) to (maxvalue, 0);
366+
create table mcrparted1_lt_b partition of mcrparted for values from (minvalue, 0) to ('b', minvalue);
367+
create table mcrparted2_b partition of mcrparted for values from ('b', minvalue) to ('c', minvalue);
368+
create table mcrparted3_c_to_common partition of mcrparted for values from ('c', minvalue) to ('common', minvalue);
369+
create table mcrparted4_common_lt_0 partition of mcrparted for values from ('common', minvalue) to ('common', 0);
370+
create table mcrparted5_common_0_to_10 partition of mcrparted for values from ('common', 0) to ('common', 10);
371+
create table mcrparted6_common_ge_10 partition of mcrparted for values from ('common', 10) to ('common', maxvalue);
372+
create table mcrparted7_gt_common_lt_d partition of mcrparted for values from ('common', maxvalue) to ('d', minvalue);
373+
create table mcrparted8_ge_d partition of mcrparted for values from ('d', minvalue) to (maxvalue, 0);
374374

375375
\d+ mcrparted
376-
\d+ mcrparted_lt_b
377-
\d+ mcrparted_b
378-
\d+ mcrparted_c_to_common
379-
\d+ mcrparted_common_lt_0
380-
\d+ mcrparted_common_0_to_10
381-
\d+ mcrparted_common_ge_10
382-
\d+ mcrparted_gt_common_lt_d
383-
\d+ mcrparted_ge_d
376+
\d+ mcrparted1_lt_b
377+
\d+ mcrparted2_b
378+
\d+ mcrparted3_c_to_common
379+
\d+ mcrparted4_common_lt_0
380+
\d+ mcrparted5_common_0_to_10
381+
\d+ mcrparted6_common_ge_10
382+
\d+ mcrparted7_gt_common_lt_d
383+
\d+ mcrparted8_ge_d
384384

385385
insert into mcrparted values ('aaa', 0), ('b', 0), ('bz', 10), ('c', -10),
386386
('comm', -10), ('common', -10), ('common', 0), ('common', 10),

0 commit comments

Comments
 (0)