Re: [GENERAL] Create Trigger Function For Table Partition.

2010-01-26 Thread yccheok
I had solved my second problem using the following technique : EXECUTE 'INSERT INTO ' || measurement_table_name || '(fk_unit_id, v) VALUES (' || NEW.fk_unit_id || ',' || NEW.v || ')'; yccheok wrote: > > By referring to > http://www.postgresql.org/docs/current/static/ddl-partitioning.html > >

[GENERAL] Create Trigger Function For Table Partition.

2010-01-26 Thread Yan Cheng Cheok
By referring to http://www.postgresql.org/docs/current/static/ddl-partitioning.html (1) I create trigger function as follow : CREATE OR REPLACE FUNCTION measurement_insert_trigger() RETURNS TRIGGER AS $BODY$DECLARE measurement_table_index bigint; measurement_table_name text; BEGIN m