BUG #7899: allow key word as alias in subquery but Can't reference it in outer query

From: Jov <amutu(at)amutu(dot)com>
To: pgsql-bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: BUG #7899: allow key word as alias in subquery but Can't reference it in outer query
Date: 2013-02-22 12:05:08
Message-ID: tencent_0D5000710AA6BD14684FF659@qq.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 7899
Logged by: jov
Email address: amutu(at)amutu(dot)com
PostgreSQL version: 9.1.3
Operating system: CentOS 6
Description:

xxx=# select 2 from (select 1 as end) t;
?column?
----------
2
(1 row)

xxx=# select end from (select 1 as end) t;
ERROR: syntax error at or near "end"
LINE 1: select end from (select 1 as end) t;
^

xxx=# select version();
version


------------------------------------------------------------------------------------------------------------
--
PostgreSQL 9.1.3 on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.4.5
20110214 (Red Hat 4.4.5-6), 64-bi
t
(1 row)

I think use key word as alias should get a error message such as $key_word
is Key Word,should not be used as identifier bla bla,so for some complex
query error user can save a lot of time.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2013-02-22 13:51:56 Re: BUG #7899: allow key word as alias in subquery but Can't reference it in outer query
Previous Message Claude Speed 2013-02-22 07:54:53 Re: new BUG: "postgresql 9.2.3: very long query time"