Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 82684799CC2 for ; Wed, 17 Mar 2010 11:38:34 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 26349-03-2 for ; Wed, 17 Mar 2010 14:38:23 +0000 (UTC) X-Greylist: delayed 00:22:07.681883 by SQLgrey-1.7.6 Received: from mail.socialserve.com (mail2.socialserve.com [66.129.73.133]) by mail.postgresql.org (Postfix) with ESMTP id F0789797D77 for ; Wed, 17 Mar 2010 11:38:17 -0300 (ADT) Received: from jlrobins.mthousingsearch.com (jlrobins.socialserve.com [10.1.1.43]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.socialserve.com (Postfix) with ESMTP id A92EF13F76B for ; Wed, 17 Mar 2010 10:16:06 -0400 (EDT) Message-Id: <8AB806D0-91F7-4D31-BB6E-690E4419C770@socialserve.com> From: James Robinson To: pgsql-sql@postgresql.org Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Subject: 8.4 versus 8.2 against nonexistent column "name" ... Date: Wed, 17 Mar 2010 10:16:08 -0400 X-Mailer: Apple Mail (2.936) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201003/136 X-Sequence-Number: 33843 Can anyone shine a light on why 8.4 behaves surprisingly when being queried for a bogus column "name", but only using qualified table/ column references. Here's a sample script: ----- create table foo ( id int, x int ); insert into foo(id, x) values (1, 23), (2, 43), (4, 45); -- Fails on both -- no column named 'name' select name from foo; -- Fails on 8.2, still no 'name' column, but 8.4 succeeds returning whole rows. select f.name from foo f; ---- On 8.2.11, both selects fail: CREATE TABLE INSERT 0 3 ERROR: column "name" does not exist LINE 1: select name from foo; ^ ERROR: column f.name does not exist LINE 1: select f.name from foo f; ^ On 8.4.2, the first select fails, but the second succeeds, returning whole rows wrapped up like tuples: CREATE TABLE INSERT 0 3 ERROR: column "name" does not exist LINE 1: select name from foo; ^ name -------- (1,23) (2,43) (4,45) (3 rows) A quick skim through the 8.3. and 8.4. release notes found nothing interesting related to 'name'. Thanks! ---- James Robinson Socialserve.com