CREATE FUNCTION f_post_insert() RETURNS trigger AS '
DECLARE
	v_level integer;
	v_rightid integer;
	nowtime timestamp(3);
	vrec RECORD;
BEGIN
	nowtime := CURRENT_TIMESTAMP;

	RETURN NEW;
END;
' LANGUAGE plpgsql
;

CREATE TRIGGER post_insert BEFORE INSERT ON forum_post FOR EACH ROW
EXECUTE PROCEDURE f_post_insert() ;
