Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 667389FC032 for ; Wed, 8 Aug 2007 09:29:33 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 59658-07 for ; Wed, 8 Aug 2007 09:29:25 -0300 (ADT) X-Greylist: delayed 00:12:24.303459 by SQLgrey-1.7.5 Received: from s15216962.onlinehome-server.info (s15216962.onlinehome-server.info [217.160.22.205]) by postgresql.org (Postfix) with ESMTP id 7A2A99FC022 for ; Wed, 8 Aug 2007 09:29:24 -0300 (ADT) Received: (from uucp@localhost) by s15216962.onlinehome-server.info (8.13.3/8.13.3) with UUCP id l78CTTPC026605 for pgsql-sql@postgresql.org; Wed, 8 Aug 2007 14:29:29 +0200 Received: (from weigelt@localhost) by nibiru.metux.de (8.12.10/8.12.10) id l78CSXGb020671 for pgsql-sql@postgresql.org; Wed, 8 Aug 2007 14:28:33 +0200 Date: Wed, 8 Aug 2007 14:28:33 +0200 From: Enrico Weigelt To: pgsql-sql Subject: Re: Converting from MS Access field aliases Message-ID: <20070808122832.GB27936@nibiru.local> Reply-To: weigelt@metux.de References: <746273.93291.qm@web54305.mail.re2.yahoo.com> <634.1184260980@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <634.1184260980@sss.pgh.pa.us> User-Agent: Mutt/1.4.1i X-Terror: bin laden, kill bush, Briefbombe, Massenvernichtung, KZ, X-Nazi: Weisse Rasse, Hitlers Wiederauferstehung, 42, X-Antichrist: weg mit schaeuble, ausrotten, heiliger krieg, al quaida, X-Killer: 23, endloesung, Weltuntergang, X-Doof: wer das liest ist doof X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200708/48 X-Sequence-Number: 28986 * Tom Lane 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/ ---------------------------------------------------------------------