NEW keyword represent in a PostgreSQL trigger?NEW holds the new row data for INSERT or UPDATE operations inside a trigger function.
OLD keyword represent in a PostgreSQL trigger?OLD holds the old row data for UPDATE or DELETE operations inside a trigger function.
NEW in a DELETE trigger?No. NEW is not available in DELETE triggers because no new row is created.
OLD available?OLD is available in UPDATE and DELETE triggers because the old row exists before the change.
NEW record's column named price inside a trigger function?Use NEW.price to get the value of the price column in the new row.
OLD holds the old row data before an update or delete.
NEW?NEW is available in INSERT and UPDATE triggers, not DELETE.
NEW in a DELETE trigger?NEW is not defined in DELETE triggers and causes an error if accessed.
OLD in triggers?OLD is available in UPDATE and DELETE triggers.
name column of the new row in a trigger?NEW.name accesses the name column of the new row.
NEW and OLD in PostgreSQL triggers.NEW and when you can access OLD in trigger functions.