Bug #839: triggers do not execute in right order in procedures

From: pgsql-bugs(at)postgresql(dot)org
To: pgsql-bugs(at)postgresql(dot)org
Subject: Bug #839: triggers do not execute in right order in procedures
Date: 2002-12-06 07:04:39
Message-ID: 20021206070439.B35A0475DD7@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Eugene Gridasov (eugene(at)spider(dot)ru) reports a bug with a severity of 1
The lower the number the more severe it is.

Short Description
triggers do not execute in right order in procedures

Long Description
The constraint trigger on delete executes ONLY after procedure
completion, but it does not execute right after delete. WHY?

Sample Code
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=123;
raise notice ''rows selected: %'',i;
delete from table1 where id=123;
select count(*) into i from table2 where t1_id=123;
raise notice ''rows selected: %'',i;
end;

No file was uploaded with this report

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2002-12-06 15:56:11 Re: bogus varno EXPLAIN bug (was Re: Explain analyze gives bogus varno for dblink views)
Previous Message Евгений Гридасов 2002-12-06 06:59:22 bug or feature?