Re: Triggers on SELECT?

Поиск
Список
Период
Сортировка
От Jan Wieck
Тема Re: Triggers on SELECT?
Дата
Msg-id 3F85B237.6080008@Yahoo.com
обсуждение исходный текст
Ответ на Re: Triggers on SELECT?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Tom Lane wrote:

> Josh Berkus <josh@agliodbs.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@Yahoo.com #



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [PORTS] [COMMITTERS] pgsql-server/src/template bsdi
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: Patch for allowing multiple -t options for