pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Kyle Bateman <kyle@actarg.com>
Cc: Brook Milligan <brook@biology.nmsu.edu>
Cc: pgsql-sql@postgresql.org
Subject: Re: question on update/delete rules on views
Date: Wed, 17 May 2000 17:47:13 -0400
Message-ID: <18953.958600033@sss.pgh.pa.us> (raw)
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>

Kyle Bateman <kyle@actarg.com> 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



view thread (8+ messages)

Message-ID: <18953.958600033@sss.pgh.pa.us>
Permalink:  ../18953.958600033@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/18953.958600033@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, kyle@actarg.com, brook@biology.nmsu.edu
  Subject: Re: question on update/delete rules on views
  In-Reply-To: <18953.958600033@sss.pgh.pa.us>
  References: <3921E506.82424CAF@actarg.com> <200005171352.HAA19867@biology.nmsu.edu> <3922B7A2.5BEF5F5E@actarg.com> <200005171751.LAA20341@biology.nmsu.edu> <39230546.62BE1AD9@actarg.com> <18953.958600033@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox