Received: from tisch.mail.mindspring.net (tisch.mail.mindspring.net [207.69.200.157]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id eB125xF38538; Thu, 30 Nov 2000 21:05:59 -0500 (EST) (envelope-from mhh@mindspring.com) Received: from jupiter.hollomon.fam (user-2inik9h.dialup.mindspring.com [165.121.81.49]) by tisch.mail.mindspring.net (8.9.3/8.8.5) with SMTP id VAA22670; Thu, 30 Nov 2000 21:06:00 -0500 (EST) From: Mark Hollomon Reply-To: mhh@mindspring.com Date: Thu, 30 Nov 2000 22:07:22 -0500 X-Mailer: KMail [version 1.1.99] Content-Type: text/plain; charset="iso-8859-1" Cc: pgsql-hackers@postgresql.org, pgsql-sql@postgresql.org To: Tom Lane , "Joel Burton" References: <3A255246.21430.688927F3@localhost> <19579.975544973@sss.pgh.pa.us> In-Reply-To: <19579.975544973@sss.pgh.pa.us> Subject: Re: Re: [SQL] Rules with Conditions: Bug, or Misunderstanding MIME-Version: 1.0 Message-Id: <00113022072200.00743@jupiter.hollomon.fam> Content-Transfer-Encoding: 8bit X-Archive-Number: 200011/1360 X-Sequence-Number: 1460 On Wednesday 29 November 2000 19:42, Tom Lane wrote: > > Hm. Perhaps the "cannot update view" test is too strict --- it's not > bright enough to realize that the two rules together cover all cases, > so it complains that you *might* be trying to update the view. As the > code stands, you must provide an unconditional DO INSTEAD rule to > implement insertion or update of a view. The idea was to check just before the update occurred to see if the destination was view. Maybe the test is too high up, before all rewriting occurs. It is in InitPlan, the same place we check to make sure that we are not changing a sequence or a toast table. (actually initResultRelInfo called from InitPlan). I gathered from the backend flowchart that this wasn't called until all rewriting was done. Was I wrong? If all rewriting _is_ done at that point, why is the view still in the ResultRelInfo ? -- Mark Hollomon