| From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
|---|---|
| To: | "J(dot) Roeleveld" <j(dot)roeleveld(at)softhome(dot)net> |
| Cc: | pgsql-list <pgsql-general(at)hub(dot)org> |
| Subject: | Re: [GENERAL] rule's and trigger's |
| Date: | 1999-11-27 01:07:03 |
| Message-ID: | Pine.LNX.4.20.9911261447210.344-100000@localhost.localdomain |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On 1999-11-25, J. Roeleveld mentioned:
> I was wondering if anyone knows what's being executed first,
> a Rule on a view, or a trigger set to 'before <something>' on a view?
>
> Eg. what's executed first? The RULE, or the TRIGGER?
The rules are done first. The reason is that the rules actually modify the
query before it gets to execution. In case of a view, a trigger would then
act on the query to the base table. Thus a trigger on a view might not
make too much sense.
See also the relevant chapters (39 & 41) in the Programmer's Guide.
--
Peter Eisentraut Sernanders väg 10:115
peter_e(at)gmx(dot)net 75262 Uppsala
http://yi.org/peter-e/ Sweden
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Mike Mascari | 1999-11-27 03:28:30 | Re: [GENERAL] update view |
| Previous Message | Peter Eisentraut | 1999-11-27 01:06:53 | Re: [GENERAL] about speed |