errmsg("lower bound of partition \"%s\" is not equal to lower bound of split partition \"%s\"",
relname,
get_rel_name(splitPartOid)),
- errhint("%s require combined bounds of new partitions must exactly match the bound of the split partition.",
+ errhint("%s requires the combined bounds of the new partitions to exactly match the bound of the split partition.",
"ALTER TABLE ... SPLIT PARTITION"),
parser_errposition(pstate, exprLocation((Node *) datum)));
}
errmsg("lower bound of partition \"%s\" is less than lower bound of split partition \"%s\"",
relname,
get_rel_name(splitPartOid)),
- errhint("%s require combined bounds of new partitions must exactly match the bound of the split partition.",
- "ALTER TABLE ... SPLIT PARTITION"),
+ errhint("Explicit partition bounds must be contained within the bounds of the split partition when a DEFAULT partition is specified."),
parser_errposition(pstate, exprLocation((Node *) datum)));
}
errmsg("upper bound of partition \"%s\" is not equal to upper bound of split partition \"%s\"",
relname,
get_rel_name(splitPartOid)),
- errhint("%s require combined bounds of new partitions must exactly match the bound of the split partition.",
+ errhint("%s requires the combined bounds of the new partitions to exactly match the bound of the split partition.",
"ALTER TABLE ... SPLIT PARTITION"),
parser_errposition(pstate, exprLocation((Node *) datum)));
}
errmsg("upper bound of partition \"%s\" is greater than upper bound of split partition \"%s\"",
relname,
get_rel_name(splitPartOid)),
- errhint("%s require combined bounds of new partitions must exactly match the bound of the split partition.",
- "ALTER TABLE ... SPLIT PARTITION"),
+ errhint("Explicit partition bounds must be contained within the bounds of the split partition when a DEFAULT partition is specified."),
parser_errposition(pstate, exprLocation((Node *) datum)));
}
}
errmsg("new partitions' combined partition bounds do not contain value (%s) but split partition \"%s\" does",
"NULL",
get_rel_name(partOid)),
- errhint("%s require combined bounds of new partitions must exactly match the bound of the split partition.",
+ errhint("%s requires the combined bounds of the new partitions to exactly match the bound of the split partition.",
"ALTER TABLE ... SPLIT PARTITION"));
/*
errmsg("new partitions' combined partition bounds do not contain value (%s) but split partition \"%s\" does",
deparse_expression((Node *) notFoundVal, NIL, false, false),
get_rel_name(partOid)),
- errhint("%s require combined bounds of new partitions must exactly match the bound of the split partition.",
+ errhint("%s requires the combined bounds of the new partitions to exactly match the bound of the split partition.",
"ALTER TABLE ... SPLIT PARTITION"));
}
}
ERROR: lower bound of partition "sales_feb2022" is not equal to lower bound of split partition "sales_feb_mar_apr2022"
LINE 2: (PARTITION sales_feb2022 FOR VALUES FROM ('2022-01-01') TO...
^
-HINT: ALTER TABLE ... SPLIT PARTITION require combined bounds of new partitions must exactly match the bound of the split partition.
+HINT: ALTER TABLE ... SPLIT PARTITION requires the combined bounds of the new partitions to exactly match the bound of the split partition.
-- ERROR
-- (We can create partition with the same name as split partition, but can't create two partitions with the same name)
ALTER TABLE sales_range SPLIT PARTITION sales_feb_mar_apr2022 INTO
ERROR: upper bound of partition "sales_apr2022" is not equal to upper bound of split partition "sales_feb_mar_apr2022"
LINE 4: ... sales_apr2022 FOR VALUES FROM ('2022-04-01') TO ('2022-06-0...
^
-HINT: ALTER TABLE ... SPLIT PARTITION require combined bounds of new partitions must exactly match the bound of the split partition.
+HINT: ALTER TABLE ... SPLIT PARTITION requires the combined bounds of the new partitions to exactly match the bound of the split partition.
-- ERROR
ALTER TABLE sales_range SPLIT PARTITION sales_feb_mar_apr2022 INTO
(PARTITION sales_feb2022 FOR VALUES FROM ('2022-02-01') TO ('2022-03-01'),
ERROR: lower bound of partition "sales_feb2022" is not equal to lower bound of split partition "sales_feb_mar_apr2022"
LINE 2: (PARTITION sales_feb2022 FOR VALUES FROM ('2022-02-02') TO...
^
-HINT: ALTER TABLE ... SPLIT PARTITION require combined bounds of new partitions must exactly match the bound of the split partition.
+HINT: ALTER TABLE ... SPLIT PARTITION requires the combined bounds of the new partitions to exactly match the bound of the split partition.
-- Check the source partition not in the search path
SET search_path = partition_split_schema2, public;
ALTER TABLE partition_split_schema.sales_range
ERROR: upper bound of partition "sales_apr2022" is not equal to upper bound of split partition "sales_feb_mar_apr2022"
LINE 4: ... sales_apr2022 FOR VALUES FROM ('2022-04-01') TO ('2022-06-0...
^
-HINT: ALTER TABLE ... SPLIT PARTITION require combined bounds of new partitions must exactly match the bound of the split partition.
+HINT: ALTER TABLE ... SPLIT PARTITION requires the combined bounds of the new partitions to exactly match the bound of the split partition.
DROP TABLE sales_range;
--
-- Add rows into partitioned table then split partition
PARTITION sales_east FOR VALUES IN ('Beijing', 'Delhi', 'Vladivostok'),
PARTITION sales_central FOR VALUES IN ('Warsaw', 'Berlin', 'Kyiv'));
ERROR: new partitions' combined partition bounds do not contain value (NULL) but split partition "sales_all" does
-HINT: ALTER TABLE ... SPLIT PARTITION require combined bounds of new partitions must exactly match the bound of the split partition.
+HINT: ALTER TABLE ... SPLIT PARTITION requires the combined bounds of the new partitions to exactly match the bound of the split partition.
-- ERROR
ALTER TABLE sales_list SPLIT PARTITION sales_all INTO
(PARTITION sales_west FOR VALUES IN ('Lisbon', 'New York', 'Madrid'),
PARTITION sales_east FOR VALUES IN ('Beijing', 'Delhi', 'Vladivostok'),
PARTITION sales_central FOR VALUES IN ('Warsaw', 'Berlin', NULL));
ERROR: new partitions' combined partition bounds do not contain value ('Kyiv'::character varying(20)) but split partition "sales_all" does
-HINT: ALTER TABLE ... SPLIT PARTITION require combined bounds of new partitions must exactly match the bound of the split partition.
+HINT: ALTER TABLE ... SPLIT PARTITION requires the combined bounds of the new partitions to exactly match the bound of the split partition.
-- ERROR
ALTER TABLE sales_list SPLIT PARTITION sales_all INTO
(PARTITION sales_west FOR VALUES IN ('Lisbon', 'New York', 'Madrid'),
ERROR: upper bound of partition "tp_0_51" is greater than upper bound of split partition "tp_0_51"
LINE 2: (PARTITION tp_0_51 FOR VALUES FROM (0) TO (53),
^
-HINT: ALTER TABLE ... SPLIT PARTITION require combined bounds of new partitions must exactly match the bound of the split partition.
+HINT: Explicit partition bounds must be contained within the bounds of the split partition when a DEFAULT partition is specified.
DROP TABLE t;
--
-- Try to SPLIT partition of another table.