pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: amutu@amutu.com
To: 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 01:50:32 +0000
Message-ID: <E1U8hmS-0003w9-LN@wrigleys.postgresql.org> (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. 




-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (5+ messages)  latest in thread

Message-ID: <E1U8hmS-0003w9-LN@wrigleys.postgresql.org>
Permalink:  ../E1U8hmS-0003w9-LN@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/E1U8hmS-0003w9-LN@wrigleys.postgresql.org

 · 

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: <E1U8hmS-0003w9-LN@wrigleys.postgresql.org>
  References: <E1U8hmS-0003w9-LN@wrigleys.postgresql.org>

* 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