From: Tom Lane <tgl@sss.pgh.pa.us>
To: milimeter@163.com
Cc: pgsql-general@postgresql.org
Subject: Re: Problem about pgsql's column alias
Date: Mon, 14 Apr 2003 01:44:05 -0400
Message-ID: <2151.1050299045@sss.pgh.pa.us> (raw)
In-Reply-To: <200304141316.32163."milimeter@163.com">
References: <200304141316.32163."milimeter@163.com">
"milimeter@163.com" <milimeter@163.com> writes:
> I found that in postgresql, we can only use "select login_name as name from
> users;" to get an alias "name" for column "login_name", but in most other
> databases we can omit the "as", that is "select login_name name from users;".
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.
Example: in
SELECT foo ! bar;
is the "!" an infix operator, or is it postfix with the intended meaning
SELECT (foo!) AS bar;
regards, tom lane
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 using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: tgl@sss.pgh.pa.us, milimeter@163.com, pgsql-general@postgresql.org
Subject: Re: Problem about pgsql's column alias
In-Reply-To: <2151.1050299045@sss.pgh.pa.us>
* 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