Received: from sss.pgh.pa.us (sss.pgh.pa.us [209.114.132.154]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id eB25IUF49479 for ; Sat, 2 Dec 2000 00:18:30 -0500 (EST) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.1/8.11.1) with ESMTP id eB25IdY16039; Sat, 2 Dec 2000 00:18:39 -0500 (EST) To: mhh@mindspring.com cc: "Joel Burton" , pgsql-hackers@postgresql.org Subject: Re: Re: [SQL] Rules with Conditions: Bug, or Misunderstanding In-reply-to: <00120121475101.09339@jupiter.hollomon.fam> References: <3A255246.21430.688927F3@localhost> <00113022072200.00743@jupiter.hollomon.fam> <1984.975648802@sss.pgh.pa.us> <00120121475101.09339@jupiter.hollomon.fam> Comments: In-reply-to Mark Hollomon message dated "Fri, 01 Dec 2000 21:47:51 -0500" Date: Sat, 02 Dec 2000 00:18:39 -0500 Message-ID: <16036.975734319@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200012/39 X-Sequence-Number: 1505 Mark Hollomon writes: > I think it would be better to move the test further down, to just before we > actually try to do the update/insert. Maybe into the heap access routines as > suggested by Andreas. I'm worried about whether it'll be practical to generate a good error message from that low a level. Looking at it from the DBA's viewpoint rather than implementation details, I haven't seen a good reason *why* we should support conditional rules for views, as opposed to an unconditional rule with multiple actions. Seems to me that writing independent rules that you hope will cover all cases is a great way to build an unreliable system. regards, tom lane