Re: AW: [HACKERS] triggers, views and rules (not instead) - Mailing list pgsql-hackers

From Vadim B. Mikheev
Subject Re: AW: [HACKERS] triggers, views and rules (not instead)
Date
Msg-id 34F00B75.67F737D@sable.krasnoyarsk.su
Whole thread Raw
In response to AW: [HACKERS] triggers, views and rules (not instead)  (Zeugswetter Andreas SARZ <Andreas.Zeugswetter@telecom.at>)
Responses pl/{perl,pgsql} (was Re: AW: [HACKERS] triggers, views and rules (not instead))  (Brett McCormick <brett@work.chicken.org>)
pl/{perl,pgsql} (was Re: AW: [HACKERS] triggers, views and rules (not instead))  (Brett McCormick <brett@work.chicken.org>)
Re: AW: [HACKERS] triggers, views and rules (not instead)  (jwieck@debis.com (Jan Wieck))
List pgsql-hackers
Zeugswetter Andreas SARZ wrote:
> Ok, to sum it up:
>         1. We need and want the select part of the rewrite rules.

Agreed.

>         2. for the insert/update/delete rules the old instance rules system
>             was much more appropriate. TODO: dig up the old code
>             and merge it with the current trigger Implementation
>             it must be pretty much the wanted functionality (it
>             supported sql)

??? Old instance rules system was removed by Jolly & Andrew and so
it never supported SQL. I hope that Jan will give us PL/pgSQL soon
and it will be used for triggers, without changing current trigger
implementation...

>                 3. the CURRENT keyword in the i/u/d rewrite rules is stupid
>                    and should be disabled, destroyed and burned in hell

Agreed, if standard hasn't it. I know that OLD & NEW are in standard,
for triggers atleast.

>                 4. To stick to the mainstream we should enhance the trigger
>                     syntax, and forget the rule stuff for i/u/d

Yes. Statement level triggers give the same functionality as rewrite
i/u/d rules. We could let them to return something special to skip
user' i/u/d itself, isn't it the same as INSTEAD ?

Vadim

pgsql-hackers by date:

Previous
From: "Vadim B. Mikheev"
Date:
Subject: Re: [HACKERS] How To free resources used by large object Relations?
Next
From: "Maurice Gittens"
Date:
Subject: Re: [HACKERS] How To free resources used by large object Relations?