ereport(ERROR,
errcode(ERRCODE_INVALID_PARAMETER_VALUE),
errmsg("invalid format of salt"),
- errhint("magic byte format for shacrypt is either \"$5$\" or \"$6$\""));
+ errhint("Magic byte format for shacrypt is either \"$5$\" or \"$6$\"."));
/*
* Check magic byte for supported shacrypt digest.
errcode(ERRCODE_WRONG_OBJECT_TYPE),
errmsg("\"%s\" is not a table", RelationGetRelationName(partRel)),
isMerge
- ? errhint("ALTER TABLE ... MERGE PARTITIONS can only merge partitions don't have sub-partitions")
- : errhint("ALTER TABLE ... SPLIT PARTITION can only split partitions don't have sub-partitions"));
+ ? errhint("ALTER TABLE ... MERGE PARTITIONS can only merge partitions don't have sub-partitions.")
+ : errhint("ALTER TABLE ... SPLIT PARTITION can only split partitions don't have sub-partitions."));
if (!partRel->rd_rel->relispartition)
ereport(ERROR,
errmsg("\"%s\" is not a partition of partitioned table \"%s\"",
RelationGetRelationName(partRel), RelationGetRelationName(rel)),
isMerge
- ? errhint("ALTER TABLE ... MERGE PARTITIONS can only merge partitions don't have sub-partitions")
- : errhint("ALTER TABLE ... SPLIT PARTITION can only split partitions don't have sub-partitions"));
+ ? errhint("ALTER TABLE ... MERGE PARTITIONS can only merge partitions don't have sub-partitions.")
+ : errhint("ALTER TABLE ... SPLIT PARTITION can only split partitions don't have sub-partitions."));
if (get_partition_parent(partRelOid, false) != RelationGetRelid(rel))
ereport(ERROR,
errmsg("relation \"%s\" is not a partition of relation \"%s\"",
RelationGetRelationName(partRel), RelationGetRelationName(rel)),
isMerge
- ? errhint("ALTER TABLE ... MERGE PARTITIONS can only merge partitions don't have sub-partitions")
- : errhint("ALTER TABLE ... SPLIT PARTITION can only split partitions don't have sub-partitions"));
+ ? errhint("ALTER TABLE ... MERGE PARTITIONS can only merge partitions don't have sub-partitions.")
+ : errhint("ALTER TABLE ... SPLIT PARTITION can only split partitions don't have sub-partitions."));
table_close(partRel, NoLock);
}
errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
errmsg("can not split DEFAULT partition \"%s\"",
get_rel_name(splitPartOid)),
- errhint("To split DEFAULT partition one of the new partition msut be DEFAULT"),
+ errhint("To split DEFAULT partition one of the new partition must be DEFAULT."),
parser_errposition(cxt->pstate, ((SinglePartitionSpec *) linitial(splitlist))->name->location));
/*
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 require combined bounds of new partitions must 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",
+ errhint("%s require combined bounds of new partitions must 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 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 require combined bounds of new partitions must 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",
+ errhint("%s require combined bounds of new partitions must exactly match the bound of the split partition.",
"ALTER TABLE ... SPLIT PARTITION"),
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 require combined bounds of new partitions must 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 require combined bounds of new partitions must exactly match the bound of the split partition.",
"ALTER TABLE ... SPLIT PARTITION"));
}
}
-- ERROR: "sales_apr2022" is not a table
ALTER TABLE sales_range MERGE PARTITIONS (sales_feb2022, sales_mar2022, sales_apr2022) INTO sales_feb_mar_apr2022;
ERROR: "sales_apr2022" is not a table
-HINT: ALTER TABLE ... MERGE PARTITIONS can only merge partitions don't have sub-partitions
+HINT: ALTER TABLE ... MERGE PARTITIONS can only merge partitions don't have sub-partitions.
-- ERROR: can not merge partition "sales_mar2022" together with partition "sales_jan2022"
-- DETAIL: lower bound of partition "sales_mar2022" is not equal to the upper bound of partition "sales_jan2022"
-- (space between sections sales_jan2022 and sales_mar2022)
-- ERROR: "sales_external" is not a partition of partitioned table "sales_list"
ALTER TABLE sales_list MERGE PARTITIONS (sales_west, sales_east, sales_external) INTO sales_all;
ERROR: "sales_external" is not a partition of partitioned table "sales_list"
-HINT: ALTER TABLE ... MERGE PARTITIONS can only merge partitions don't have sub-partitions
+HINT: ALTER TABLE ... MERGE PARTITIONS can only merge partitions don't have sub-partitions.
-- ERROR: "sales_external2" is not a partition of partitioned table "sales_list"
ALTER TABLE sales_list MERGE PARTITIONS (sales_west, sales_east, sales_external2) INTO sales_all;
ERROR: "sales_external2" is not a partition of partitioned table "sales_list"
-HINT: ALTER TABLE ... MERGE PARTITIONS can only merge partitions don't have sub-partitions
+HINT: ALTER TABLE ... MERGE PARTITIONS can only merge partitions don't have sub-partitions.
-- ERROR: relation "sales_nord2" is not a partition of relation "sales_list"
ALTER TABLE sales_list MERGE PARTITIONS (sales_west, sales_nord2, sales_east) INTO sales_all;
ERROR: relation "sales_nord2" is not a partition of relation "sales_list"
-HINT: ALTER TABLE ... MERGE PARTITIONS can only merge partitions don't have sub-partitions
+HINT: ALTER TABLE ... MERGE PARTITIONS can only merge partitions don't have sub-partitions.
DROP TABLE sales_external2;
DROP TABLE sales_external;
DROP TABLE sales_list2;
-- ERROR: relation "t1p1" is not a partition of relation "t2"
ALTER TABLE t2 MERGE PARTITIONS (t1p1, t2pa) INTO t2p;
ERROR: relation "t1p1" is not a partition of relation "t2"
-HINT: ALTER TABLE ... MERGE PARTITIONS can only merge partitions don't have sub-partitions
+HINT: ALTER TABLE ... MERGE PARTITIONS can only merge partitions don't have sub-partitions.
-- ERROR: "t3" is not a partition of partitioned table "t2"
ALTER TABLE t2 MERGE PARTITIONS (t2pa, t3) INTO t2p;
ERROR: "t3" is not a partition of partitioned table "t2"
-HINT: ALTER TABLE ... MERGE PARTITIONS can only merge partitions don't have sub-partitions
+HINT: ALTER TABLE ... MERGE PARTITIONS can only merge partitions don't have sub-partitions.
DROP TABLE t3;
DROP TABLE t2;
DROP TABLE t1;
(PARTITION sales_feb2022 FOR VALUES FROM ('2022-02-01') TO ('2022-10-01'));
ERROR: list of new partitions should contain at least two partitions
-- ERROR: lower bound of partition "sales_feb2022" is not equal to lower bound of split partition "sales_feb_mar_apr2022"
--- 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 require combined bounds of new partitions must exactly match the bound of the split partition.
ALTER TABLE sales_range SPLIT PARTITION sales_feb_mar_apr2022 INTO
(PARTITION sales_feb2022 FOR VALUES FROM ('2022-01-01') TO ('2022-03-01'),
PARTITION sales_mar2022 FOR VALUES FROM ('2022-03-01') TO ('2022-04-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-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 require combined bounds of new partitions must exactly match the bound of the split partition.
-- ERROR: partition with name "sales_feb_mar_apr2022" is already used
-- (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: ALTER action SPLIT PARTITION cannot be performed on relation "sales_feb_mar_apr2022"
DETAIL: This operation is not supported for tables.
-- ERROR: upper bound of partition "sales_apr2022" is not equal to upper bound of split partition "sales_feb_mar_apr2022"
--- 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 require combined bounds of new partitions must exactly match the bound of the split partition.
ALTER TABLE sales_range SPLIT PARTITION sales_feb_mar_apr2022 INTO
(PARTITION sales_feb2022 FOR VALUES FROM ('2022-02-01') TO ('2022-03-01'),
PARTITION sales_mar2022 FOR VALUES FROM ('2022-03-01') TO ('2022-04-01'),
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 require combined bounds of new partitions must exactly match the bound of the split partition.
-- ERROR: can not split to partition "sales_mar2022" together with partition "sales_feb2022"
ALTER TABLE sales_range SPLIT PARTITION sales_feb_mar_apr2022 INTO
(PARTITION sales_feb2022 FOR VALUES FROM ('2022-02-01') TO ('2022-03-01'),
-- Tests for spaces between partitions, them should be executed without DEFAULT partition
ALTER TABLE sales_range DETACH PARTITION sales_others;
-- ERROR: lower bound of partition "sales_feb2022" is not equal to lower bound of split partition "sales_feb_mar_apr2022"
--- 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 require combined bounds of new partitions must exactly match the bound of the split partition.
ALTER TABLE sales_range SPLIT PARTITION sales_feb_mar_apr2022 INTO
(PARTITION sales_feb2022 FOR VALUES FROM ('2022-02-02') TO ('2022-03-01'),
PARTITION sales_mar2022 FOR VALUES FROM ('2022-03-01') TO ('2022-04-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 require combined bounds of new partitions must 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
CREATE TABLE sales_jan2022 PARTITION OF sales_range FOR VALUES FROM ('2022-01-01') TO ('2022-02-01');
CREATE TABLE sales_feb_mar_apr2022 PARTITION OF sales_range FOR VALUES FROM ('2022-02-01') TO ('2022-05-01');
-- ERROR: upper bound of partition "sales_apr2022" is not equal to upper bound of split partition "sales_feb_mar_apr2022"
--- 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 require combined bounds of new partitions must exactly match the bound of the split partition.
ALTER TABLE sales_range SPLIT PARTITION sales_feb_mar_apr2022 INTO
(PARTITION sales_feb2022 FOR VALUES FROM ('2022-02-01') TO ('2022-03-01'),
PARTITION sales_mar2022 FOR VALUES FROM ('2022-03-01') TO ('2022-04-01'),
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 require combined bounds of new partitions must exactly match the bound of the split partition.
DROP TABLE sales_range;
--
-- Add rows into partitioned table then split partition
DETAIL: lower bound of partition "sales_error" is not equal to the upper bound of partition "sales_dec2021"
HINT: ALTER TABLE ... SPLIT PARTITION requires the partition bounds to be adjacent.
-- ERROR: can not split DEFAULT partition "sales_others"
--- HINT: To split DEFAULT partition one of the new partition msut be DEFAULT
+-- HINT: To split DEFAULT partition one of the new partition must be DEFAULT.
ALTER TABLE sales_range SPLIT PARTITION sales_others INTO
(PARTITION sales_dec2021 FOR VALUES FROM ('2021-12-01') TO ('2022-01-01'),
PARTITION sales_jan2022 FOR VALUES FROM ('2022-01-01') TO ('2022-02-01'),
ERROR: can not split DEFAULT partition "sales_others"
LINE 2: (PARTITION sales_dec2021 FOR VALUES FROM ('2021-12-01') TO...
^
-HINT: To split DEFAULT partition one of the new partition msut be DEFAULT
+HINT: To split DEFAULT partition one of the new partition must be DEFAULT.
-- no error: bounds of sales_noerror are between sales_dec2021 and sales_feb2022
ALTER TABLE sales_range SPLIT PARTITION sales_others INTO
(PARTITION sales_dec2021 FOR VALUES FROM ('2021-12-01') TO ('2022-01-01'),
CREATE TABLE sales_nord PARTITION OF sales_list FOR VALUES IN ('Helsinki', 'St. Petersburg', 'Oslo');
CREATE TABLE sales_all PARTITION OF sales_list FOR VALUES IN ('Warsaw', 'Lisbon', 'New York', 'Madrid', 'Beijing', 'Berlin', 'Delhi', 'Kyiv', 'Vladivostok', NULL);
-- 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 require combined bounds of new partitions must exactly match the bound of the split partition.
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', '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 require combined bounds of new partitions must exactly match the bound of the split partition.
-- 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 require combined bounds of new partitions must exactly match the bound of the split partition.
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 require combined bounds of new partitions must exactly match the bound of the split partition.
-- ERROR DEFAULT partition should be one
ALTER TABLE sales_list SPLIT PARTITION sales_all INTO
(PARTITION sales_west FOR VALUES IN ('Lisbon', 'New York', 'Madrid'),
(PARTITION t2a FOR VALUES FROM ('A') TO ('B'),
PARTITION t2b FOR VALUES FROM ('B') TO ('C'));
ERROR: relation "t1pa" is not a partition of relation "t2"
-HINT: ALTER TABLE ... SPLIT PARTITION can only split partitions don't have sub-partitions
+HINT: ALTER TABLE ... SPLIT PARTITION can only split partitions don't have sub-partitions.
DROP TABLE t2;
DROP TABLE t1;
--
(PARTITION sales_feb2022 FOR VALUES FROM ('2022-02-01') TO ('2022-10-01'));
-- ERROR: lower bound of partition "sales_feb2022" is not equal to lower bound of split partition "sales_feb_mar_apr2022"
--- 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 require combined bounds of new partitions must exactly match the bound of the split partition.
ALTER TABLE sales_range SPLIT PARTITION sales_feb_mar_apr2022 INTO
(PARTITION sales_feb2022 FOR VALUES FROM ('2022-01-01') TO ('2022-03-01'),
PARTITION sales_mar2022 FOR VALUES FROM ('2022-03-01') TO ('2022-04-01'),
PARTITION sales_apr2022 FOR VALUES FROM ('2022-04-01') TO ('2022-05-01'));
-- ERROR: upper bound of partition "sales_apr2022" is not equal to upper bound of split partition "sales_feb_mar_apr2022"
--- 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 require combined bounds of new partitions must exactly match the bound of the split partition.
ALTER TABLE sales_range SPLIT PARTITION sales_feb_mar_apr2022 INTO
(PARTITION sales_feb2022 FOR VALUES FROM ('2022-02-01') TO ('2022-03-01'),
PARTITION sales_mar2022 FOR VALUES FROM ('2022-03-01') TO ('2022-04-01'),
ALTER TABLE sales_range DETACH PARTITION sales_others;
-- ERROR: lower bound of partition "sales_feb2022" is not equal to lower bound of split partition "sales_feb_mar_apr2022"
--- 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 require combined bounds of new partitions must exactly match the bound of the split partition.
ALTER TABLE sales_range SPLIT PARTITION sales_feb_mar_apr2022 INTO
(PARTITION sales_feb2022 FOR VALUES FROM ('2022-02-02') TO ('2022-03-01'),
PARTITION sales_mar2022 FOR VALUES FROM ('2022-03-01') TO ('2022-04-01'),
CREATE TABLE sales_feb_mar_apr2022 PARTITION OF sales_range FOR VALUES FROM ('2022-02-01') TO ('2022-05-01');
-- ERROR: upper bound of partition "sales_apr2022" is not equal to upper bound of split partition "sales_feb_mar_apr2022"
--- 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 require combined bounds of new partitions must exactly match the bound of the split partition.
ALTER TABLE sales_range SPLIT PARTITION sales_feb_mar_apr2022 INTO
(PARTITION sales_feb2022 FOR VALUES FROM ('2022-02-01') TO ('2022-03-01'),
PARTITION sales_mar2022 FOR VALUES FROM ('2022-03-01') TO ('2022-04-01'),
PARTITION sales_others DEFAULT);
-- ERROR: can not split DEFAULT partition "sales_others"
--- HINT: To split DEFAULT partition one of the new partition msut be DEFAULT
+-- HINT: To split DEFAULT partition one of the new partition must be DEFAULT.
ALTER TABLE sales_range SPLIT PARTITION sales_others INTO
(PARTITION sales_dec2021 FOR VALUES FROM ('2021-12-01') TO ('2022-01-01'),
PARTITION sales_jan2022 FOR VALUES FROM ('2022-01-01') TO ('2022-02-01'),
CREATE TABLE sales_all PARTITION OF sales_list FOR VALUES IN ('Warsaw', 'Lisbon', 'New York', 'Madrid', 'Beijing', 'Berlin', 'Delhi', 'Kyiv', 'Vladivostok', NULL);
-- 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 require combined bounds of new partitions must exactly match the bound of the split partition.
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', 'Kyiv'));
-- 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 require combined bounds of new partitions must exactly match the bound of the split partition.
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'),