Re: Converting from MS Access field aliases - Mailing list pgsql-sql

From Gregory Stark
Subject Re: Converting from MS Access field aliases
Date
Msg-id 878x9l705l.fsf@oxford.xeocode.com
Whole thread Raw
In response to Re: Converting from MS Access field aliases  (Adam Tauno Williams <adamtaunowilliams@gmail.com>)
List pgsql-sql
"Adam Tauno Williams" <adamtaunowilliams@gmail.com> writes:

> "AS" works in Informix, and I believe, in DB2 as well.  So it is at
> least pretty common;  I'm not saying it is correct.  Since Informix
> predates M$-SQL they at least didn't invent it.

AS works in Postgres too. But the defined aliases are only in the resulting
output columns, not in scope for the where clause. In fact the expressions
used aren't even evaluated for rows which don't match the where clause which
is pretty important if those expressions are subqueries or volatile functions.

--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com



pgsql-sql by date:

Previous
From: "Radhika Sambamurti"
Date:
Subject: Query Plan
Next
From: Gregory Stark
Date:
Subject: Re: Query Plan