Re: Problem about pgsql's column alias - Mailing list pgsql-general

From Tom Lane
Subject Re: Problem about pgsql's column alias
Date
Msg-id 2151.1050299045@sss.pgh.pa.us
Whole thread Raw
In response to Problem about pgsql's column alias  ("milimeter@163.com" <milimeter@163.com>)
List pgsql-general
"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


pgsql-general by date:

Previous
From: Weiping He
Date:
Subject: Encoding conversion problem in AIX 4.3.3?
Next
From: "Ben-Nes Michael"
Date:
Subject: Re: Q about transactions