Re: Converting from MS Access field aliases

From: Enrico Weigelt <weigelt(at)metux(dot)de>
To: pgsql-sql <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Converting from MS Access field aliases
Date: 2007-08-08 12:28:33
Message-ID: 20070808122832.GB27936@nibiru.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

* Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

Hi,

> This is not an "extension", it is *directly* contrary to both
> the letter and spirit of the SQL standard.

at which point is this breaking the specification ?
What would happen if postgres would allow this ?

IMHO supporting aliases in where clauses would make some
queries easier to read. Think of cases where some column
is coming from an complex calculation (ie. many nested
CASE'es, etc, etc) and you need that calculated column
in the WHERE clause. Of course it's good style to encode
those things in views, but is this always very performant ?

cu
--
---------------------------------------------------------------------
Enrico Weigelt == metux IT service - http://www.metux.de/
---------------------------------------------------------------------
Please visit the OpenSource QM Taskforce:
http://wiki.metux.de/public/OpenSource_QM_Taskforce
Patches / Fixes for a lot dozens of packages in dozens of versions:
http://patches.metux.de/
---------------------------------------------------------------------

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Enrico Weigelt 2007-08-08 12:40:54 Performance on writable views
Previous Message Enrico Weigelt 2007-08-08 12:16:11 Implementing an regex filter