-
Notifications
You must be signed in to change notification settings - Fork 69
Closed
Labels
Description
Hi,
Is there any way to automatically insert some data into one partition (table_old_data) if the value less than something?
Like this in postgres:
CREATE OR REPLACE FUNCTION table_insert_trigger()
.......
BEGIN
IF (NEW.time_key >= TIMESTAMP '2016-10-01 00:00:00' and NEW.time_key < TIMESTAMP '2016-10-02 00:00:00') THEN
INSERT into table_pt_01 values (NEW.) ;
.......................................................
ELSE
INSERT into table_old values (NEW.) ;
END IF;
RETURN NULL;
END;
thanks