[BUGS] BUG #6632: before delete triggers that delete rows from the same table can invalidate constraints

2012-05-07 Thread ignas
The following bug has been logged on the website: Bug reference: 6632 Logged by: Ignas Mikalajunas Email address: ig...@pow.lt PostgreSQL version: 9.1.3 Operating system: Ubuntu 11.11 Description: The snippet that reproduces the bug: drop schema public cascade;

Re: [BUGS] BUG #6632: before delete triggers that delete rows from the same table can invalidate constraints

2012-05-07 Thread Tom Lane
ig...@pow.lt writes: [ you can sabotage foreign key constraints with triggers ] This is not a bug, it's a don't do that issue. The only way to prevent it would be to not fire triggers during FK operations, or to somehow restrict what triggers are allowed to do, and either of those cures would

Re: [BUGS] BUG #6632: before delete triggers that delete rows from the same table can invalidate constraints

2012-05-07 Thread Ignas Mikalajunas
On Mon, May 7, 2012 at 6:06 PM, Tom Lane t...@sss.pgh.pa.us wrote: ig...@pow.lt writes: [ you can sabotage foreign key constraints with triggers ] This is not a bug, it's a don't do that issue.  The only way to prevent it would be to not fire triggers during FK operations, or to somehow