Re: Question on trigger data visibility

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Question on trigger data visibility
Дата
Msg-id 8485.1283184518@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Question on trigger data visibility  (Terry Lee Tucker <terry@chosen-ones.org>)
Список pgsql-general
Terry Lee Tucker <terry@chosen-ones.org> writes:
> On Monday, August 30, 2010 07:20:14 Maurice Gittens wrote:
>> So, it seems that even though my trigger is defined as AFTER INSERT
>> FOR EACH STATEMENT, the inserted row
>> does not appear to be included in the join.
>>
>> So, now to my question: Should, as a matter of principle, statement
>> level triggers not "see" rows recently inserted into the tablex?

> They do "see" those rows. Are you sure that the inner join with tab_Y is not
> causing the problem? Just a guess...

It also seems worth pointing out that this trigger would hardly ensure
referential integrity.  As quoted, it would succeed so long as there is
at least one tablex row that is properly referencing some tablez row.
Surely you want to require that they *all* do.

            regards, tom lane

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

Предыдущее
От: wei725@lycos.com
Дата:
Сообщение: Re: How to convert a binary filed to an integer field?
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Database corruption