Re: Isolation / Visibility inside a trigger

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Isolation / Visibility inside a trigger
Дата
Msg-id 20061103133637.GD27350@svana.org
обсуждение исходный текст
Ответ на Re: Isolation / Visibility inside a trigger  (Jorge Godoy <jgodoy@gmail.com>)
Ответы Re: Isolation / Visibility inside a trigger  (Jorge Godoy <jgodoy@gmail.com>)
Список pgsql-general
On Fri, Nov 03, 2006 at 10:24:21AM -0300, Jorge Godoy wrote:
> But then, the answer to my question is that even inside the same transaction
> or receiving the NEW row those functions called by the trigger shouldn't see
> the information.  Did I get it right?

Correct. Before triggers happen prior to the backend even attampting to
insert. AIUI it happens before uniqueness checks, check constraints,
foreign key checks, etc. As far as anything else in the system is
concerned, the row does not exist yet.

If it's just the flag field that's being updated, perhaps you could
split the flags and result field into a seperate table updated by the
after trigger.

Hope this helps,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Вложения

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

Предыдущее
От: Shane Ambler
Дата:
Сообщение: Re: Cannot rename file pg_xlog\0000.....
Следующее
От: Jorge Godoy
Дата:
Сообщение: Re: Isolation / Visibility inside a trigger