Shorthand column labels (SELECT col1 foo, ...) vs (SELECT col1 AS foo, ...) - Mailing list pgsql-sql

From Ken Johanson
Subject Shorthand column labels (SELECT col1 foo, ...) vs (SELECT col1 AS foo, ...)
Date
Msg-id 4785C50F.6010505@kensystem.com
Whole thread Raw
Responses Re: Shorthand column labels (SELECT col1 foo, ...) vs (SELECT col1 AS foo, ...)  (Paul Lambert <plengada@optusnet.com.au>)
List pgsql-sql
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




pgsql-sql by date:

Previous
From: "Phillip Smith"
Date:
Subject: Re: Support for SQL TOP clause?
Next
From: Paul Lambert
Date:
Subject: Re: Shorthand column labels (SELECT col1 foo, ...) vs (SELECT col1 AS foo, ...)