BUG #7899: allow key word as alias in subquery but Can't reference it in outer query - Mailing list pgsql-bugs

From Jov
Subject BUG #7899: allow key word as alias in subquery but Can't reference it in outer query
Date
Msg-id tencent_0D5000710AA6BD14684FF659@qq.com
Whole thread Raw
Responses Re: BUG #7899: allow key word as alias in subquery but Can't reference it in outer query  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
The following bug has been logged on the website:

Bug reference:      7899
Logged by:          jov
Email address:      amutu@amutu.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. 

pgsql-bugs by date:

Previous
From: Jeff Janes
Date:
Subject: Re: new BUG: "postgresql 9.2.3: very long query time"
Next
From: Tom Lane
Date:
Subject: Re: BUG #7899: allow key word as alias in subquery but Can't reference it in outer query