Re: RI within PLPGSQL

Поиск
Список
Период
Сортировка
Искать
От
cnliou
Тема
Re: RI within PLPGSQL
Дата
Msg-id
1071289154.30802.cnliou@so-net.net.tw
Список
Дерево обсуждения
Re: RI within PLPGSQL "cnliou" <cnliou@so-net.net.tw>
Re: RI within PLPGSQL Stephan Szabo <sszabo@megazone.bigpanda.com>
Thank you very much for your explanation!

¡° Include¡m"Stephan Szabo" ¡n
wrote: 
>There have been discussions in the past about when cascade 
events
>should occur.  The code currently does what I believe was 
last
>agreed upon, although its behavior is fairly wierd for 
deferred
>constraints and functions.  Right now the cascade happens 
at the
>end of the full statement (in this case the call to the 
function)
>which is why you get a key constraint error in the second 
call to f1
>and why the later inserted row is removed in f2.

It sounds to me that the only solution to my case is 
executing

DELETE FROM referenced_table

and

INSERT INTO referencing_table

in seperate transactions. Please correct me if I am wrong.

I also feel it might be a good idea to include an example 
like the one in my previous message in the documentation so 
that this question hopefully will not be asked repeatedly.

Regards,

CN
В списке pgsql-bugs по дате отправления
От: Neil Conway
Дата:
Сообщение: Re: libpq3 + ssl memory leak
От: Stephan Szabo
Дата:
Сообщение: Re: RI within PLPGSQL
FAQ