Re: AW: [HACKERS] Rule system - Mailing list pgsql-hackers

From Andreas Zeugswetter
Subject Re: AW: [HACKERS] Rule system
Date
Msg-id 01BDC618.BDD6D610@zeugswettera.user.lan.at
Whole thread Raw
In response to AW: [HACKERS] Rule system  (Andreas Zeugswetter <andreas.zeugswetter@telecom.at>)
List pgsql-hackers
>    But  then again, even if functions stay that restricted, what
>    do we need as rule functionality?  Up to now I only have  all
>    kinds of INSTEAD rules on the statement level on my list.

The [select] trigger can't return sets/tuples or multiple rows the select rule system can.
This is because of the currently restricted "create function" return values.

I'll try to look over my diploma paper tonight, to look for rules that (at least currently)
cannot be written as triggers (other than instead rules).

What I like about the rewrite sytem is, that it passes through the optimizer.
No way the trigger stuff is going to be optimizable, is it ? It will always do something like
a nested loop.

Please let's not get rid of rules until we have the full trigger functionality discussed earlier,
even if it does behave strangely in some cases, it is still very usable.
I think the select rule stuff is mostly working since your last changes ;-)
Maybe we could add syntax to the trigger statement to simply use the current
select rule stuff ?

Andreas


pgsql-hackers by date:

Previous
From: t-ishii@sra.co.jp
Date:
Subject: Re: [HACKERS] 6.3.2. patch for functional indices
Next
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] Re: type coersion (was OR clause status)