On Tue, May 02, 2006 at 12:11:34PM -0500, Steve V wrote: > >When that rule should never fire (the id hasn't changed). If I change > >the conditional of the rule to something that must always be false > >(like false, or 1 = 0), it will still behave in this manner. > > Does anyone know what's going on here? I'm experiencing an identical > situation, and it doesn't seem logical. If it evaluates to false, why > on earth is the function result set attempting to be returned? Maybe > not a bug, but definitely unexpected behavior A rule is a macro. This means that the expression in the rule will always happen. If you have a rule to do a SELECT after an UPDATE, the client will see the results of the SELECT. You almost never want RULEs. It's not clear what you want to do, but a trigger is more likely to do what you want (as well as a lot easier to understand). If you set debug_print_rewritten=on you should be able to see what is actually being executed... Have a nice day, -- Martijn van Oosterhout <kleptog@xxxxxxxxx> http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to litigate.
Attachment:
signature.asc
Description: Digital signature