X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id BDFFCD1C920 for ; Wed, 30 Jul 2003 21:05:07 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 89023-03 for ; Wed, 30 Jul 2003 18:04:06 -0300 (ADT) Received: from ward.six (unknown [212.57.173.22]) by svr1.postgresql.org (Postfix) with ESMTP id CE2B7D1C911 for ; Wed, 30 Jul 2003 18:05:04 -0300 (ADT) Date: Thu, 31 Jul 2003 03:02:52 +0600 From: Denis Zaitsev To: pgsql-sql@postgresql.org Subject: Re: Nonexistent NEW relation in some places of rules Message-ID: <20030731030252.A2700@natasha.ward.six> References: <20030730033328.B4870@natasha.ward.six> <5035.1059517964@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200307/471 X-Sequence-Number: 14585 On Tue, Jul 29, 2003 at 06:32:44PM -0400, Tom Lane wrote: > The problem is that the rule gets expanded into something rather like > > insert into a select ... from new, produce(new.b); > > and we can't support that. If we ever add support for SQL99's > LATERAL(), it might help improve matters. Thanks. I was suspecting something like. Does the presence of this leak mean that such a selects are needed very rarely? Or does it mean that some well-known workaround exists?