Re: Mandatory AS keyword in SELECT statements

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: vincent(dot)moreau(at)adeoservices(dot)com, pgsql-general(at)postgresql(dot)org
Subject: Re: Mandatory AS keyword in SELECT statements
Date: 2008-01-04 15:52:22
Message-ID: 20080104155222.GA9833@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Jan 04, 2008 at 09:31:41AM -0500, Bruce Momjian wrote:
> Unfortunately, this is on our TODO list as something we are not planning
> to do:
>
> * Allow AS in "SELECT col AS label" to be optional (not wanted)
>
> Because we support postfix operators, it isn't possible to make AS
> optional and continue to use bison.

For reference, the problematic examples are:

SELECT a + b; -- Is this (a +) aliased to "b", or (a+b) with no alias
SELECT 'foo'::character varying -- Is "varying" an alias or part of the type name?

See this thread:
http://archives.postgresql.org/pgsql-hackers/2003-04/msg00436.php

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Those who make peaceful revolution impossible will make violent revolution inevitable.
> -- John F Kennedy

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Oleg Bartunov 2008-01-04 15:54:32 Re: tsearch2 headline options
Previous Message Jeff Larsen 2008-01-04 15:22:30 Re: Using syslog on pg for Windows