Re: factorial function/phase out postfix operators?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Vik Fearing <vik(at)postgresfriends(dot)org>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: factorial function/phase out postfix operators?
Date: 2020-05-19 18:30:08
Message-ID: 6883.1589913008@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Tue, May 19, 2020 at 11:32 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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.

> I came to similar conclusions a couple of years ago:
> https://www.postgresql.org/message-id/CA+TgmoYzPvT7uiHjWgKtyTivHHLNCp0yLavCoipE-LyG3w2wOQ@mail.gmail.com

Ah, right.

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

Might work. My main concern would be if we have to forbid those keywords
as column names --- for words like "year", in particular, that'd be a
disaster. If the net effect is only that they can't be AS-less col labels,
it won't break any cases that worked before.

Our existing four-way keyword classification is not something that was
handed down on stone tablets. I wonder whether postfix-ectomy changes
the situation enough that a complete rethinking would be helpful.

I also continue to think that more lookahead and token-merging would
be interesting to pursue. It'd hardly surprise anybody if the
token pair "character varying" were always treated as a type name,
for instance.

Anyway, the bottom-line conclusion remains the same: let's make sure
we know what we'd do after getting rid of postfix ops, before we do
that.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2020-05-19 19:31:03 Re: factorial function/phase out postfix operators?
Previous Message Robert Haas 2020-05-19 18:03:21 Re: factorial function/phase out postfix operators?