Miscellaneous Reconciliation Optimizations in Partitioning Expressions Based On Updatable Current Date and Updatable Current Timestamp
The following case applies to altering the partitioning expression of a populated table using an ALTER TABLE TO CURRENT request.
Consider the following partitioning definition.
CREATE TABLE ppi_1 (
PARTITION BY CASE_N(j < DATE '2011-01-01',
j >= DATE '2011-01-01')
Assume that the current date is DATE '2011-01-01'. You cannot alter the partitioning definition for table ppi_1 using an ordinary ALTER TABLE request after ppi_1 has been populated with rows, but you can alter its definition using an ALTER TABLE TO CURRENT request if you define the table using a CURRENT_DATE function instead of specifying a simple date as the redefined table definition ppi_2 demonstrates.
This redefinition of the partitioning expression for ppi_1, which replaces the DATE specification in its partitioning expression with a CURRENT_DATE specification, can be modified using an ALTER TABLE TO CURRENT request.
CREATE TABLE ppi_2 (
PARTITION BY CASE_N(j < CURRENT_DATE,
j >= CURRENT_DATE)
For this example, the value of CURRENT_DATE resolves to DATE ‘2011-01-01’.