Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 7F8299FB96F for ; Thu, 12 Jul 2007 19:48:40 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 81908-09 for ; Thu, 12 Jul 2007 19:48:34 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id CA77E9FB735 for ; Thu, 12 Jul 2007 19:48:37 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id l6CMmVta013142; Thu, 12 Jul 2007 18:48:31 -0400 (EDT) To: adamtaunowilliams@gmail.com cc: sql pgsql Subject: Re: Converting from MS Access field aliases 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> Comments: In-reply-to Adam Tauno Williams message dated "Thu, 12 Jul 2007 16:34:10 -0400" Date: Thu, 12 Jul 2007 18:48:31 -0400 Message-ID: <13141.1184280511@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/76 X-Sequence-Number: 28811 Adam Tauno Williams writes: > On Thu, 2007-07-12 at 13:23 -0400, Tom Lane wrote: >> chester c young writes: >>> SELECT field1 / 2 AS foo, >>> field2 * 2 AS bar, >>> foo + bar AS total >>> WHERE foo < 12; >> This is not an "extension", it is *directly* contrary to both the letter >> and spirit of the SQL standard. > "AS" works in Informix, and I believe, in DB2 as well. I can't speak to Informix, but I will bet a good lunch that it does not work like that in DB2. DB2 is one of the more nearly standard-conformant databases on the planet. (Or possibly it's the other way around ... there seem to be a lot of IBMers on the committee.) regards, tom lane