Re: Converting from MS Access field aliases

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: <adamtaunowilliams(at)gmail(dot)com>
Cc: "sql pgsql" <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Converting from MS Access field aliases
Date: 2007-07-12 22:00:22
Message-ID: 878x9l705l.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

"Adam Tauno Williams" <adamtaunowilliams(at)gmail(dot)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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Gregory Stark 2007-07-12 22:14:47 Re: Query Plan
Previous Message Radhika Sambamurti 2007-07-12 21:11:00 Query Plan