Re: [GENERAL] Problem about pgsql's column alias

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: milimeter(at)163(dot)com, PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [GENERAL] Problem about pgsql's column alias
Date: 2003-04-14 16:40:01
Message-ID: Pine.LNX.4.44.0304141455000.1919-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers pgsql-interfaces pgsql-jdbc

Tom Lane writes:

> AS is not optional in Postgres, and will never be so unless we choose to
> drop support for postfix operators, which I consider an unlikely choice.

Well, we could drop the support for postfix operators in aliasing clauses
that omit the AS. In fact, I got the following to work with no further
changes:

target_el: a_expr AS ColLabel
| c_expr IDENT // new
| a_expr
| '*'

If we wanted more than IDENT, we would need to trade off some key words in
(few) other places, but it looks doable.

--
Peter Eisentraut peter_e(at)gmx(dot)net

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-04-14 17:00:55 Re: [GENERAL] Problem about pgsql's column alias
Previous Message Ned Lilly 2003-04-14 16:09:00 MySQL and RHDB news; 8.0 troll

Browse pgsql-hackers by date

  From Date Subject
Next Message John Gray 2003-04-14 16:52:34 Re: How do you execute a postgresql function from perl?
Previous Message terr 2003-04-14 16:24:11 Re: No merge sort?

Browse pgsql-interfaces by date

  From Date Subject
Next Message Tom Lane 2003-04-14 17:00:55 Re: [GENERAL] Problem about pgsql's column alias
Previous Message email lists 2003-04-14 09:23:10 plpython module loading errors

Browse pgsql-jdbc by date

  From Date Subject
Next Message Tom Lane 2003-04-14 17:00:55 Re: [GENERAL] Problem about pgsql's column alias
Previous Message Peter Royal 2003-04-14 16:33:09 Index metadata not sorted by ORDINAL_POSITION