I am trying to create a statement-level trigger that is deferred, and also reference the new transition table
So far I have tried this (on table rows):
CREATE CONSTRAINT TRIGGER check_rows
AFTER INSERT OR UPDATE OR DELETE
ON rows
REFERENCING NEW TABLE AS newtable
DEFERRABLE INITIALLY DEFERRED
FOR EACH STATEMENT
EXECUTE FUNCTION check_rows();
But I'm getting the error syntax error at or near "REFERENCING"
What are my eyes missing here?