Chris Berry <chrisdberry82@xxxxxxxxxxxxxx> writes: > When I update, insert or delete to one table, I need a trigger to delete and > possibly insert into another table. The trigger I have works for insert and > update, but returns an error when I do a delete. There's no "NEW" row in a delete trigger (... and the error message should have told you that pretty explicitly ...). You can look at the OLD row instead. BTW, you should probably think carefully about what the UPDATE case is doing and whether it needs to look at NEW or OLD or a combination. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general