DROP_PARTITIONS
Drops the specified table partition keys.
Note
This function supersedes meta-function DROP_PARTITION, which was deprecated in Vertica 9.0.Drops the specified table partition keys.
This is a meta-function. You must call meta-functions in a top-level SELECT statement.
Behavior type
VolatileSyntax
DROP_PARTITIONS (
'[[database.]schema.]table-name',
'min-range-value',
'max-range-value'
[, 'force-split']
)
Arguments
[
database
.]
schema
Database and schema. The default schema is
public
. If you specify a database, it must be the current database.table-name
- The target table. The table cannot be used as a dimension table in a pre-join projection and cannot have out-of-date (unrefreshed) projections.
min-range-value
,max-range-value
- The minimum and maximum value of partition keys to drop, where
min‑range‑value
must be ≤max‑range‑value
. To specify a single partition key,min‑range‑value
andmax‑range‑value
must be equal. force-split
Optional Boolean argument, specifies whether to split ROS containers if the range of partition keys spans multiple containers or part of a single container:
-
true
: Split ROS containers as needed. -
false
(default): Return with an error if ROS containers must be split to implement this operation.
Note
In rare cases, DROP_PARTITIONS executes at the same time as a mergeout operation on the same ROS container. As a result, the function cannot split the container as specified and returns with an error. When this happens, call DROP_PARTITIONS again.-
Privileges
One of the following:
-
DBADMIN
-
Table owner
-
USAGE privileges on the table schema and TRUNCATE privileges on the table
Examples
See Dropping partitions.