pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gregory Stark <stark@enterprisedb.com>
To: adamtaunowilliams@gmail.com
Cc: sql pgsql <pgsql-sql@postgresql.org>
Subject: Re: Converting from MS Access field aliases
Date: Thu, 12 Jul 2007 23:00:22 +0100
Message-ID: <878x9l705l.fsf@oxford.xeocode.com> (raw)
In-Reply-To: <1184272450.4427.35.camel@aleph.whitemice.org>
References: <746273.93291.qm@web54305.mail.re2.yahoo.com>
	<634.1184260980@sss.pgh.pa.us>
	<1184272450.4427.35.camel@aleph.whitemice.org>

"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




view thread (13+ messages)  latest in thread

Message-ID: <878x9l705l.fsf@oxford.xeocode.com>
Permalink:  ../878x9l705l.fsf@oxford.xeocode.com/
Also on:    postgresql.org/message-id/878x9l705l.fsf@oxford.xeocode.com

 · 

reply

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-sql@postgresql.org
  Cc: stark@enterprisedb.com, adamtaunowilliams@gmail.com
  Subject: Re: Converting from MS Access field aliases
  In-Reply-To: <878x9l705l.fsf@oxford.xeocode.com>

* 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