Re: BUG #6306: sql parser: weird behaviour when selecting tablename.'name' from a table

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: karacho(at)kommespaeter(dot)de
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #6306: sql parser: weird behaviour when selecting tablename.'name' from a table
Date: 2011-11-24 12:36:29
Message-ID: 4ECE3A4D.10202@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 24.11.2011 11:44, karacho(at)kommespaeter(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Robert Haas 2011-11-24 16:14:38 Re: BUG #6300: duplicate key value violates unique constraint
Previous Message Heikki Linnakangas 2011-11-24 12:07:53 Re: BUG #6304: initdb fails with loale ko_KR.eucKR