pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jov <amutu@amutu.com>
To: pgsql-bugs <pgsql-bugs@postgresql.org>
Subject: BUG #7899: allow key word as alias in subquery but Can't reference it in outer query
Date: Fri, 22 Feb 2013 20:05:08 +0800
Message-ID: <tencent_0D5000710AA6BD14684FF659@qq.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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.

view thread (5+ messages)  latest in thread

Message-ID: <tencent_0D5000710AA6BD14684FF659@qq.com>
Permalink:  ../tencent_0D5000710AA6BD14684FF659@qq.com/
Also on:    postgresql.org/message-id/tencent_0D5000710AA6BD14684FF659@qq.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: amutu@amutu.com
  Subject: Re: BUG #7899: allow key word as alias in subquery but Can't reference it in outer query
  In-Reply-To: <tencent_0D5000710AA6BD14684FF659@qq.com>
  References: <tencent_0D5000710AA6BD14684FF659@qq.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox