Sample Header Ad - 728x90

Insert RECORD into a table in a trigger function

10 votes
2 answers
8354 views
I would like to insert a RECORD data type variable (NEW variable) into a table in a trigger. What would the SQL look like? The following attempts were unsuccessful: EXECUTE 'INSERT INTO my_table VALUES ' || NEW; EXECUTE 'INSERT INTO my_table VALUES ' || NEW.*; EXECUTE 'INSERT INTO my_table SELECT * FROM ' || NEW;
Asked by Egidi (393 rep)
Feb 7, 2014, 09:56 AM
Last activity: Feb 7, 2014, 08:35 PM