on-partition-range.md
Specifies to limit data of this projection to a range of partition keys, specified as follows:
ON PARTITION RANGE BETWEEN min-range-value AND max-range-value
where the following requirements apply to min-range-value and ≤ max-range-value:
-
min-range-valuemust be ≤max-range-value -
They must resolve to a data type that is compatible with the table partition expression.
-
They can be:
-
String literals—for example,
2021-07-31 -
Expressions with stable or immutable functions, for example:
date_trunc('month', now()::timestamp - interval'1 month')
-
max-range-value can be set to NULL, to specify that the partition range has no upper bound.