Bastiaan Olij <bastiaan@basenlily.me> writes:
> Would a before insert trigger work on a view as well?
Ah, sorry, wasn't paying close-enough attention.
For a view, you can only provide an INSTEAD OF trigger, and that feature
only exists in fairly recent PG releases. But if you're running such a
release then I recommend looking into that way. Rules are, um, not the
best part of Postgres.
regards, tom lane