Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 1B36747656C for ; Fri, 6 Dec 2002 22:43:51 -0500 (EST) Received: from candle.pha.pa.us (momjian.navpoint.com [207.106.42.251]) by postgresql.org (Postfix) with ESMTP id 83EA4475D4B for ; Fri, 6 Dec 2002 22:43:01 -0500 (EST) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.10.1) id gB73h2H14787; Fri, 6 Dec 2002 22:43:02 -0500 (EST) From: Bruce Momjian Message-Id: <200212070343.gB73h2H14787@candle.pha.pa.us> Subject: Re: Rules/Trigges Trade-offs In-Reply-To: <200212070224.gB72OiM06066@candle.pha.pa.us> To: PostgreSQL-SQL Date: Fri, 6 Dec 2002 22:43:02 -0500 (EST) Cc: josh@agliodbs.com, Jean-Luc Lachance X-Mailer: ELM [version 2.4ME+ PL99 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200212/88 X-Sequence-Number: 10676 Bruce Momjian wrote: > > > > 3) There are no AFTER Rules, making, for example, a rule with a table > > check on > > > > the new data impractical, so you'd want to use Triggers or Constraints > > > > > > We have changed ordering in 7.3 where I think INSERT rules are _after_ > > > the insert. > > > > How would that work? What if I want to reject the insert? > > Uh, good question. I can't remember now what we re-ordered in 7.3, but > I thought it had to do with rules. OK, I found what I wanted. We made rules fire in alphabetical order in 7.3, and INSTEAD rules are not reordered to the font/back --- they are treated just like any other rule and executed alphabetically. I thought we had some problem with rules or triggers and OLD/NEW handling, but I can't see any mention of that, and it must have been in an older release. The question of firing order is a good one and one that isn't asked very often. -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073