Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id F39AE2EBA79 for ; Thu, 24 Nov 2011 08:41:44 -0400 (AST) Received: from exprod7og121.obsmtp.com ([64.18.2.20]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RTYca-0008Do-Gj for pgsql-bugs@postgresql.org; Thu, 24 Nov 2011 12:41:45 +0000 Received: from mail-bw0-f51.google.com ([209.85.214.51]) (using TLSv1) by exprod7ob121.postini.com ([64.18.6.12]) with SMTP ID DSNKTs47e9ht2Gv3Dj0/QL13tbQ4QJdjPTPa@postini.com; Thu, 24 Nov 2011 04:41:44 PST Received: by bkat8 with SMTP id t8so2359124bka.38 for ; Thu, 24 Nov 2011 04:41:29 -0800 (PST) Received: by 10.204.156.141 with SMTP id x13mr29146542bkw.54.1322138193365; Thu, 24 Nov 2011 04:36:33 -0800 (PST) Received: from [192.168.1.100] (dsl-hkibrasgw2-ff6cc300-200.dhcp.inet.fi. [88.195.108.200]) by mx.google.com with ESMTPS id a10sm25234552fam.20.2011.11.24.04.36.30 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 24 Nov 2011 04:36:31 -0800 (PST) Message-ID: <4ECE3A4D.10202@enterprisedb.com> Date: Thu, 24 Nov 2011 14:36:29 +0200 From: Heikki Linnakangas User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; fi-FI; rv:1.9.2.23) Gecko/20111010 Icedove/3.1.15 MIME-Version: 1.0 To: karacho@kommespaeter.de CC: pgsql-bugs@postgresql.org Subject: Re: BUG #6306: sql parser: weird behaviour when selecting tablename.'name' from a table References: <201111240944.pAO9imQB065672@wwwmaster.postgresql.org> In-Reply-To: <201111240944.pAO9imQB065672@wwwmaster.postgresql.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Archive-Number: 201111/167 X-Sequence-Number: 31762 On 24.11.2011 11:44, karacho@kommespaeter.de wrote: > PostgreSQL version: 8.4 > ... > Selecting (nonexistant) column 'name' or 'varchar' results in an error. > Selecting qualified nonexistant columns 'name' or 'varchar', you get the > record as record. The view definition shows * casted to name or varchar. > > db=# create temp table tmp_table (a int, b text); > CREATE TABLE > db=# create view v_tmp as select name from tmp_table; > FEHLER: Spalte »name« existiert nicht > ZEILE 1: create view v_tmp as select name from tmp_table; > ^ > db=# create view v_tmp as select tmp_table.name, tmp_table.varchar from > tmp_table; See: http://archives.postgresql.org/pgsql-sql/2011-08/msg00028.php -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com