X-Original-To: pgsql-hackers@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 6F10447580B for ; Mon, 14 Apr 2003 20:34:38 -0400 (EDT) Received: from filer (12-234-86-219.client.attbi.com [12.234.86.219]) by postgresql.org (Postfix) with ESMTP id CC747474E44 for ; Mon, 14 Apr 2003 20:34:37 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) (uid 1000) by filer with local; Mon, 14 Apr 2003 17:35:18 -0700 Date: Mon, 14 Apr 2003 17:35:18 -0700 From: Kevin Brown To: PostgreSQL Development Subject: Re: [GENERAL] Problem about pgsql's column alias Message-ID: <20030415003518.GZ1833@filer> Mail-Followup-To: Kevin Brown , PostgreSQL Development References: <10849.1050339655@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline In-Reply-To: <10849.1050339655@sss.pgh.pa.us> User-Agent: Mutt/1.4i Organization: Frobozzco International X-Spam-Status: No, hits=-38.0 required=5.0 tests=BAYES_10,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, REFERENCES,REPLY_WITH_QUOTES,USER_AGENT_MUTT autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200304/451 X-Sequence-Number: 37941 Tom Lane wrote: > Peter Eisentraut writes: > > Tom Lane writes: > >> AS is not optional in Postgres, and will never be so unless we choose to > >> drop support for postfix operators, which I consider an unlikely choice. > > > Well, we could drop the support for postfix operators in aliasing clauses > > that omit the AS. > > I think it would be a bad idea in any case; it would mask errors too > easily. For example, you meant to say "SELECT a + b, ..." but wrote > "SELECT a b, ...". Or how about this: > SELECT 'foo'::character varying > Is "varying" an alias or part of the type name? Shouldn't we be deprecating the use of :: in favor of the SQL-standard CAST()? -- Kevin Brown kevin@sysexperts.com