Re: [BUGS] BUG #1676: Statment order in rules

2005-05-20 Thread Olleg Samoylov
Tom Lane wrote: This isn't a bug. The DELETE causes the a=0 row to disappear from the I undestand. When I got choice between rules and triggers, I looked carefully is documantation, section "33.6. Rules versus Triggers". As I can see, rules prefered, there are many examples, why rules better then

Re: [BUGS] BUG #1676: Statment order in rules

2005-05-19 Thread Tom Lane
"Olleg Samoylov" <[EMAIL PROTECTED]> writes: > create rule delete_first as on delete to v do instead (delete from a where > a=old.a;update c set c=c-1); > delete from v where a=0; > select * from a; > -- 0 row, as expected :-) > select * from c; > -- 1, this is incorrect This isn't a bug. The DE

[BUGS] BUG #1676: Statment order in rules

2005-05-19 Thread Olleg Samoylov
The following bug has been logged online: Bug reference: 1676 Logged by: Olleg Samoylov Email address: [EMAIL PROTECTED] PostgreSQL version: 7.4.7 Operating system: on x86_64-pc-linux-gnu, compiled by GCC x86_64-linux-gcc (GCC) 3.3.5 (Debian 1:3.3.5-12) Description:St