Partition Clause
A table definition specifies partitioning through a PARTITION BY
clause:
PARTITION BY expression
where expression resolves to a value derived from one or more table columns.
Requirements and Restrictions
PARTITION BY
expressions can specify leaf expressions, functions, and operators. The following requirements and restrictions apply:
- All table projections must include all columns referenced in the
PARTITION BY
expression; otherwise, Vertica cannot resolve the expression. - A partition clause expression can reference multiple columns, but it must resolve to a single non-null value for each row.
- All leaf expressions must be constants or table columns.
- All other expressions must be functions and operators. The following restrictions apply to functions:
- They must be immutable—that is, they return the same value regardless of time and locale and other session- or environment-specific conditions.
- They cannot be aggregate functions.
- They cannot be Vertica meta-functions.
- A partition clause expression cannot include queries.
See Also
Using Table Partitions in the Administrator's Guide.