Received: from localhost (unknown [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 9F66E2E02B2 for ; Sat, 22 Dec 2007 20:15:13 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 08502-03 for ; Sat, 22 Dec 2007 20:14:56 -0400 (AST) Received: from proton.planetargon.com (proton.planetargon.com [198.145.115.11]) by postgresql.org (Postfix) with ESMTP id 858612E0265 for ; Sat, 22 Dec 2007 20:15:06 -0400 (AST) Received: from [10.0.1.200] (c-67-165-16-168.hsd1.ct.comcast.net [67.165.16.168]) by proton.planetargon.com (Postfix) with ESMTP id 0BD3186D3D3; Sat, 22 Dec 2007 16:14:39 -0800 (PST) In-Reply-To: <1B7BB76A-D750-4808-8104-2EC50DDB2FBA@gmail.com> References: <1B7BB76A-D750-4808-8104-2EC50DDB2FBA@gmail.com> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Cc: pgsql-sql@postgresql.org Content-Transfer-Encoding: 7bit From: Michael Glaesemann Subject: Re: Misnamed field in subquery does not cause error when field name exists in parent query Date: Sat, 22 Dec 2007 19:14:26 -0500 To: Rick Innis X-Mailer: Apple Mail (2.752.2) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/117 X-Sequence-Number: 29809 On Dec 22, 2007, at 17:12 , Rick Innis wrote: > It may be that SQL is doing exactly as it should, since 'id' is in > scope within the subselect, but if that's the case it's a nasty > gotcha. Yes, and yes. Michael Glaesemann grzm seespotcode net