Re: bug or feature?

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: bug or feature?
Дата
Msg-id 20021211083619.V93553-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на bug or feature?  (Евгений Гридасов <eugene@spider.ru>)
Список pgsql-bugs
On Fri, 6 Dec 2002, [Windows-1251] =C5=E2=E3=E5=ED=E8=E9 =C3=F0=E8=E4=E0=F1=
=EE=E2 wrote:

> Hello there
> have some problems on 7.2.3/freebsd
>
> ex.
> table1 has 2 columns: id and name
> table2 has 3 columns: id, t1_id(references t1(id) on delete cascade) and
> 'name' field
>
> i got a procedure (plpgsql)
>
> declare i int;
> begin
>   select count(*) into i from table2 where t1_id=3D123;
>   raise notice ''rows selected: %'',i;
>   delete from table1 where id=3D123;
>   select count(*) into i from table2 where t1_id=3D123;
>   raise notice ''rows selected: %'',i;
> end;
>
>  the constraint trigger on delete executes ONLY after procedure
>  completion, but it does not execute right after delete. WHY?

It's considered to run at the end of statement (where the statement
in question is the statement that calls the plpgsql function).  There's
been arguments about the timing of the referential actions, but I believe
this is currently the expected behavior.

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

Предыдущее
От: "David F. Skoll"
Дата:
Сообщение: Segmentation fault inside libpq with PHP
Следующее
От: Joe Conway
Дата:
Сообщение: Re: ON DELETE triggers don't work as documented