@@ -528,95 +528,95 @@ drop table brtrigpartcon;
528528drop function brtrigpartcon1trigf();
529529-- check multi-column range partitioning with minvalue/maxvalue constraints
530530create 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 | |
545545Partition 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 | |
561561Partition of: mcrparted FOR VALUES FROM (MINVALUE, 0) TO ('b', MINVALUE)
562562Partition 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 | |
570570Partition of: mcrparted FOR VALUES FROM ('b', MINVALUE) TO ('c', MINVALUE)
571571Partition 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 | |
579579Partition of: mcrparted FOR VALUES FROM ('c', MINVALUE) TO ('common', MINVALUE)
580580Partition 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 | |
588588Partition of: mcrparted FOR VALUES FROM ('common', MINVALUE) TO ('common', 0)
589589Partition 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 | |
597597Partition of: mcrparted FOR VALUES FROM ('common', 0) TO ('common', 10)
598598Partition 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 | |
606606Partition of: mcrparted FOR VALUES FROM ('common', 10) TO ('common', MAXVALUE)
607607Partition 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 | |
615615Partition of: mcrparted FOR VALUES FROM ('common', MAXVALUE) TO ('d', MINVALUE)
616616Partition 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);
630630select 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
646646drop table mcrparted;
0 commit comments