Re: factorial function/phase out postfix operators?

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Robert Haas <robertmhaas@gmail.com>, Vik Fearing <vik@postgresfriends.org>, Peter Eisentraut <peter.eisentraut@2ndquadrant.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2020-05-20T22:21:17Z
Lists: pgsql-hackers
Alvaro Herrera <alvherre@2ndquadrant.com> writes:
> On 2020-May-20, Tom Lane wrote:
>> I feel like we'd be better advised to somehow
>> treat can-be-bare-col-label as an independent classification.

> Would it make sense (and possible) to have a keyword category that is
> not disjoint wrt. the others?  Maybe that ends up being easier than
> a solution that ends up with six or seven categories.

Yeah, that's the same thing I was vaguely imagining -- an independent
flag on each keyword as to whether it can be used as a bare column
alias.

			regards, tom lane



Commits

  1. Remove precedence hacks no longer needed without postfix operators.

  2. Allow most keywords to be used as column labels without requiring AS.

  3. Remove support for postfix (right-unary) operators.

  4. Remove factorial operators, leaving only the factorial() function.

  5. Further refine patch for commenting operator implementation functions.