From: | Jan Wieck <JanWieck(at)Yahoo(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | josh(at)agliodbs(dot)com, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Triggers on SELECT? |
Date: | 2003-10-09 19:08:39 |
Message-ID: | 3F85B237.6080008@Yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane wrote:
> Josh Berkus <josh(at)agliodbs(dot)com> writes:
>> Now that we have Statement-level triggers, is there any reason we shouldn't
>> have triggers on SELECT?
>
> Plenty, although I'm too tired to recall 'em all. The fundamental
> problem with this is that it turns SELECT into an operation with
> side-effects.
The other fundamental problem is the definition of SELECT. To show just
one of the 273 possible problems:
UPDATE sometab SET foo = 'bar'
WHERE NOT EXISTS (SELECT 1 FROM othertab WHERE o_id = s_id);
Now explain in detail what the ON SELECT trigger on othertab will be
fired for.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck(at)Yahoo(dot)com #
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2003-10-09 19:25:13 | Re: Patch for allowing multiple -t <table-name> options for |
Previous Message | Bruce Momjian | 2003-10-09 19:05:28 | Re: [HACKERS] [COMMITTERS] pgsql-server/src/template bsdi |