Re: Tables cannot have INSTEAD OF triggers

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Andres Freund <andres(at)2ndquadrant(dot)com>, Aliouii Ali <aliouii(dot)ali(at)aol(dot)fr>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Tables cannot have INSTEAD OF triggers
Date: 2015-04-01 17:15:26
Message-ID: 2170.1427908526@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andres Freund <andres(at)anarazel(dot)de> writes:
> On 2015-04-01 12:46:05 -0400, Robert Haas wrote:
>> So, the idea is that INSTEAD OF would behave like BEFORE but the tuple
>> it returns wouldn't actually be inserted? That wasn't clear to me
>> from the OP, but I guess it would be a reasonable way to go.

> I'm not sure what the OP intended, but to me that's pretty much the only
> reasonable definition of INSTEAD OF for tables that I can think of.

If you have such a trigger, it's impossible to insert any rows, which
means the table doesn't need storage, which means it may as well be a
view, no? So this still seems to me like a wart not a useful feature.
I think it would create confusion because a table with such a trigger
would act so much unlike other tables.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2015-04-01 17:20:50 Re: Tables cannot have INSTEAD OF triggers
Previous Message Andres Freund 2015-04-01 17:07:04 Re: Tables cannot have INSTEAD OF triggers