Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id 8CFCE475452 for ; Fri, 5 Apr 2002 00:59:56 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.4/8.11.4) with ESMTP id g355xoF22097; Fri, 5 Apr 2002 00:59:50 -0500 (EST) To: Frank Joerdens Cc: pgsql-sql@postgresql.org Subject: Re: Rule trouble (looks to me exactly like the example) In-reply-to: <25306.1017948553@sss.pgh.pa.us> References: <20020404191719.C30469@superfly.archi-me-des.de> <25306.1017948553@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Thu, 04 Apr 2002 14:29:13 -0500" Date: Fri, 05 Apr 2002 00:59:49 -0500 Message-ID: <22094.1017986389@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200204/63 X-Sequence-Number: 7328 I wrote: > What's happening is that "new.id" is effectively still NULL at the point > where the rule is processed, so the rule WHERE condition fails. I'm not > sure why you're bothering with that WHERE condition anyway ... but this > seems to be another argument for moving INSERT's default-value-insertion > step to before the rule rewriter. I've committed fixes for this into CVS tip. regards, tom lane