Skip site navigation (1) Skip section navigation (2)

Re: DO INSTEAD and conditional rules

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jan Wieck <JanWieck(at)Yahoo(dot)com>
Cc: Rob Butler <crodster2k(at)Yahoo(dot)com>,David Wheeler <david(at)kineticode(dot)com>,pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>,Neil Conway <neilc(at)samurai(dot)com>
Subject: Re: DO INSTEAD and conditional rules
Date: 2005-04-26 19:35:32
Message-ID: 9881.1114544132@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Jan Wieck <JanWieck(at)Yahoo(dot)com> writes:
> On 4/26/2005 3:01 PM, Rob Butler wrote:
>> Are rules even needed anymore?  Can't you do this all
>> with triggers?  If you want to "DO INSTEAD" just use a
>> row based trigger, and return null.  Or is this less
>> efficient?

> On INSERT, yes, on UPDATE, how so?

We don't support triggers of any kind on views.

One possibility for an alternative mechanism is to allow triggers on
views --- but I'm not sure exactly how this would work, or if it would
solve all the problems.  At the very least it would answer the "data
stability" issue, since I suppose the trigger would receive precomputed
rows that wouldn't change while it executed.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: David WheelerDate: 2005-04-26 20:17:26
Subject: Re: DO INSTEAD and conditional rules
Previous:From: Jan WieckDate: 2005-04-26 19:14:14
Subject: Re: DO INSTEAD and conditional rules

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group