My contacts table has a FK with cascade delete to foreign table companies using the company_id column. I have a DELETE AFTER trigger on my contacts table that checks to see if there are any contacts left with an email address or it won't allow you to delete the record for a company. However, if the company is being deleted, is there a way I can test for the cascade delete reason and have my trigger allow the contact to be deleted? --Robert -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general