Re: [HACKERS] Weired FK problem

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [HACKERS] Weired FK problem
Дата
Msg-id 199912101917.OAA29438@candle.pha.pa.us
обсуждение исходный текст
Ответ на Weired FK problem  (wieck@debis.com (Jan Wieck))
Ответы Re: [HACKERS] Weired FK problem  (wieck@debis.com (Jan Wieck))
Список pgsql-hackers
Looks like it works.  I just tried a related item:

>     Now the other way round:
> 
>     (S1)    insert into t1 values (1);
>     (S1)    begin;

>     (S2)    delete from t1 where a = 1;
>     (S1)    insert into t2 values (1);

I swapped the above two items, and the INSERT properly failed the
contraint.

> 
>     (S2)    -- Session is now blocked
> 
>     (S1)    commit;
> 
>     (S2)    -- Session continues without error

I was a little unsure how trigger visibility was going to handle cases
where the constraint failure happened after the other transaction
started, but it seems to work fine.

It is only the trigger that has full visibility, not the statements in
the query, right?

--  Bruce Momjian                        |  http://www.op.net/~candle maillist@candle.pha.pa.us            |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


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

Предыдущее
От: Lamar Owen
Дата:
Сообщение: Re: [HACKERS] question
Следующее
От: wieck@debis.com (Jan Wieck)
Дата:
Сообщение: Re: [HACKERS] Weired FK problem