Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 029272E0291 for ; Mon, 24 Dec 2007 15:25:53 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 02212-01 for ; Mon, 24 Dec 2007 15:25:50 -0400 (AST) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.178]) by postgresql.org (Postfix) with ESMTP id 4E2CB2E0144 for ; Mon, 24 Dec 2007 15:25:50 -0400 (AST) Received: by py-out-1112.google.com with SMTP id u77so3784968pyb.15 for ; Mon, 24 Dec 2007 11:25:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:in-reply-to:references:mime-version:content-type:message-id:cc:content-transfer-encoding:from:subject:date:to:x-mailer; bh=4uGe08BNyAkECSi/K4c4Q8SlaUM0o+5jTM7l5Bjm8d8=; b=Bd3tnxC6zx4YaXAYi5BlSR18975Gitq4DgDt3ruMNGOBSHFAwHwsLjKtZTojHVQLq/G1OXg+7Z+osN6QG1R0GbJmiCZD1Xoq8Hir0gsLV8OKl5UbXxpLTd75+EwcytcYgtDjnh8rvnXeKWkQrATLbacx+fdynNdTHaPNEO4OKKc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=in-reply-to:references:mime-version:content-type:message-id:cc:content-transfer-encoding:from:subject:date:to:x-mailer; b=ZeSbhEdJacz4esUxG7PmPLJAsoZWgTCVL0VN6f/sSnFhmiTRqA1tTKEAqmukVOSZXOpHsbl0t6pDN+X3atnIe6BxoYFqB1btvCg2A28cntrPgKJxWeoe9ByBwK4VvgPYA2RdUQp7xUuJMTuj2SE1gTqGDA8DZNWoWmOCdmseyI0= Received: by 10.65.20.18 with SMTP id x18mr8650769qbi.92.1198524348993; Mon, 24 Dec 2007 11:25:48 -0800 (PST) Received: from ?192.168.213.33? ( [99.231.154.182]) by mx.google.com with ESMTPS id f18sm2662888qba.14.2007.12.24.11.25.48 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 24 Dec 2007 11:25:48 -0800 (PST) In-Reply-To: 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: Rick Innis Subject: Re: Misnamed field in subquery does not cause error when field name exists in parent query Date: Mon, 24 Dec 2007 14:25:33 -0500 To: Michael Glaesemann X-Mailer: Apple Mail (2.752.2) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/131 X-Sequence-Number: 29823 On 22-Dec-07, at 7:14 PM, Michael Glaesemann 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. Ow. Thanks for confirming both my suspicions and my fears :-) R.