Received: from localhost (unknown [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id D230F2E3B00 for ; Thu, 10 Jan 2008 03:20:23 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 29090-07 for ; Thu, 10 Jan 2008 03:20:17 -0400 (AST) Received: from mail04.syd.optusnet.com.au (mail04.syd.optusnet.com.au [211.29.132.185]) by postgresql.org (Postfix) with ESMTP id 7046D2E4411 for ; Thu, 10 Jan 2008 03:20:17 -0400 (AST) Received: from [172.17.2.31] (203-59-134-193.perm.iinet.net.au [203.59.134.193]) (authenticated sender plengada) by mail04.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id m0A7KAQn000715; Thu, 10 Jan 2008 18:20:12 +1100 Message-ID: <4785C744.6080406@optusnet.com.au> Date: Thu, 10 Jan 2008 16:20:36 +0900 From: Paul Lambert User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: Ken Johanson CC: pgsql-sql@postgresql.org Subject: Re: Shorthand column labels (SELECT col1 foo, ...) vs (SELECT col1 AS foo, ...) References: <4785C50F.6010505@kensystem.com> In-Reply-To: <4785C50F.6010505@kensystem.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/63 X-Sequence-Number: 29916 Ken Johanson wrote: > I notice PG doesn't allow shorthand column labels -- it requires the > 'AS' operand. > > SELECT col1 foo, ...; -> ERROR: syntax error at or near "foo" > > For compatibility with other databases, what objections might be argued > in allowing this syntax in the future? > > On the 'pros' side I think it eases migration to PG, shortens code, is > similar syntax to shorthand table aliases, and some users might argue it > has become defacto syntax among DBs. > > Regards, > Ken Briefly discussed a couple of weeks ago. See http://archives.postgresql.org/pgsql-general/2008-01/msg00089.php