Received: from sss2.sss.pgh.pa.us (sss.pgh.pa.us [209.114.166.2]) by hub.org (8.9.3/8.9.3) with ESMTP id RAA54509 for ; Wed, 17 May 2000 17:47:40 -0400 (EDT) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss2.sss.pgh.pa.us (8.9.3/8.9.3) with ESMTP id RAA18956; Wed, 17 May 2000 17:47:13 -0400 (EDT) To: Kyle Bateman cc: Brook Milligan , pgsql-sql@postgresql.org Subject: Re: question on update/delete rules on views In-reply-to: <39230546.62BE1AD9@actarg.com> References: <3921E506.82424CAF@actarg.com> <200005171352.HAA19867@biology.nmsu.edu> <3922B7A2.5BEF5F5E@actarg.com> <200005171751.LAA20341@biology.nmsu.edu> <39230546.62BE1AD9@actarg.com> Comments: In-reply-to Kyle Bateman message dated "Wed, 17 May 2000 14:47:02 -0600" Date: Wed, 17 May 2000 17:47:13 -0400 Message-ID: <18953.958600033@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200005/38 Kyle Bateman writes: > BTW, do you have an equally sensible explanation of how the "where > condition" that is part of the rule syntax differs from the where > clause that comes after the "do instead"? The rule WHERE condition determines *whether* the rule is fired for update of a given view tuple. (If it isn't, then that tuple is processed as if there were no rule.) Assuming that the rule fires, a WHERE inside its action will determine which tuples it actually acts on. I think there are some examples in the docs of uses of nonempty rule WHERE conditions. If not, you could try looking at the rules regression test for examples ... regards, tom lane