David Wheeler <[EMAIL PROTECTED]> writes:No, you can have multiple queries--you just have to understand that those that come first might have an effect on those that come later.
... which indeed can be a feature, not a bug, depending on what you're doing ...
regards, tom lane
There is no such thing as a free lunch here. If one wants a row inserted by one action being visible by a subsequent one, then a delete done in another action must (by default) be visible to subsequent actions as well. I don't think that fiddling with scan-command-ID's on top of the rule definitions will make the average user understand them easier.
The multi-action rules usually come into play when someone attempts to make join-views updatable. Not an easy problem, granted, but most of the time I have found a combination of rules together with ON UPDATE/DELETE CASCADE constraints or even user defined triggers absolutely sufficient. The INSERT and UPDATE case is handled by rules as usual. And in the DELETE case the rule just deletes the critical rows and the ON DELETE CASCADE constraints do the rest.
Jan
-- #======================================================================# # It's easier to get forgiveness for being wrong than for being right. # # Let's break this rule - forgive me. # #================================================== [EMAIL PROTECTED] #
---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])