Re: factorial function/phase out postfix operators?

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

Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> writes:
> What I was hoping to get out of this was to resolve some of the weird
> precedence hacks that were blamed on postfix operators.

Yeah, I was thinking about that too, but hadn't gotten to it.

> But building on your patch, the best I could achieve was

> -%nonassoc IDENT GENERATED NULL_P PARTITION RANGE ROWS GROUPS PRECEDING
> FOLLOWING CUBE ROLLUP
> +%nonassoc IDENT PARTITION RANGE ROWS GROUPS PRECEDING FOLLOWING CUBE
> ROLLUP

> which is a pretty poor yield.

I'd hoped for better as well. Still, it's possible this would save us
from greater pain in the future, seeing that the SQL committee seems
resolutely uninterested in whether the syntax they invent is parsable.

(Also, there are other factors here: I think at least some of those
precedence hacks are there to avoid fully reserving the associated
keywords.)

> Maybe this isn't worth it after all.

It'd be nice to have a better yield from removing a user-visible
feature. Perhaps there would be no complaints about removing
postfix ops, but if there are I want to be able to point to some
substantial benefit that users get from it. (Which is why I focused
on the optional-AS business to start with ... users don't care
about how many precedence hacks we need.)

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2020-05-25 22:59:09 Re: Trouble with hashagg spill I/O pattern and costing
Previous Message Tomas Vondra 2020-05-25 22:04:07 Re: Trouble with hashagg spill I/O pattern and costing