Re: Combining insert rules on views with functions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bastiaan Olij <bastiaan(at)basenlily(dot)me>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Combining insert rules on views with functions
Date: 2015-09-17 04:14:04
Message-ID: 23729.1442463244@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Bastiaan Olij <bastiaan(at)basenlily(dot)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

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Bastiaan Olij 2015-09-17 04:46:35 Re: Combining insert rules on views with functions
Previous Message Tom Lane 2015-09-17 03:46:46 Re: Combining insert rules on views with functions