On Tue, May 19, 2020 at 11:32 AM Tom Lane <t...@sss.pgh.pa.us> wrote:
> Before we go much further on this, we should have some proof
> that there's actually material benefit to be gained.  I spent some
> time just now trying to relax the AS restriction by ripping out
> postfix ops, and the results were not too promising.  Indeed the
> postfix-ops problem goes away, but then you find out that SQL's
> random syntax choices for type names become the stumbling block.
> An example here is that given
>
>         SELECT 'foo'::character varying
>
> it's not clear if "varying" is supposed to be part of the type name or a
> column label.  It looks to me like we'd have to increase the reserved-ness
> of VARYING, PRECISION, and about half a dozen currently-unreserved
> keywords involved in INTERVAL syntax, including such popular column names
> as "month", "day", and "year".
>
> Plus I got conflicts on WITHIN, GROUP, and FILTER from ordered-set
> aggregate syntax; those are currently unreserved keywords, but they
> can't be allowed as AS-less column labels.

I came to similar conclusions a couple of years ago:

https://www.postgresql.org/message-id/ca+tgmoyzpvt7uihjwgktytivhhlncp0ylavcoipe-lyg3w2...@mail.gmail.com

What I proposed at the time was creating a new category of keywords.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


Reply via email to