Answer the question
In order to leave comments, you need to log in
Are there variables like NEW and OLD in statement level triggers?
NEW
Data type RECORD. The variable contains the new database row for INSERT/UPDATE commands in row-level triggers. In statement-level triggers and for the DELETE command, this variable is not assigned a value.
OLD
Data type RECORD. The variable contains the old database row for UPDATE/DELETE commands in row level triggers. In statement-level triggers and for the INSERT statement, this variable is not assigned a value.
Answer the question
In order to leave comments, you need to log in
Yes, for AFTER STATEMENT triggers there is :
CREATE TRIGGER transfer_insert
AFTER UPDATE ON transfer
REFERENCING NEW TABLE AS newtab OLD TABLE AS oldtab
FOR EACH STATEMENT
EXECUTE FUNCTION check_transfer_balances_to_zero();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question