Martin Foster <martin(at)ethereal-realms(dot)org> writes:
> Now what happens is that every time a work is updated or removed it will
> make sure that the parent layers and gallery do not use it as a
> highlight. Meaning that the trigger upon update/delete of Works will
> update Layer and Gallery.
Couldn't you do that as an ON DELETE SET NULL foreign key reference,
instead of using a custom trigger?
regards, tom lane