Re: factorial function/phase out postfix operators?
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2020-05-19T12:27:39Z
Lists: pgsql-hackers
On Mon, May 18, 2020 at 10:42 AM Peter Eisentraut <peter.eisentraut@2ndquadrant.com> wrote: > What are the thoughts about then marking the postfix operator deprecated > and eventually removing it? I wrote a little bit about this last year: http://postgr.es/m/CA+TgmoarLfSQcLCh7jx0737SZ28qwbuy+rUWT6rSHAO=B-6xdw@mail.gmail.com I think it's generally a good idea, though perhaps we should consider continuing to allow '!' as a postfix operator and just removing support for any other. That would probably allow us to have a very short deprecation period, since real-world use of user-defined postfix operators seems to be nil -- and it would also make this into a change that only affects the lexer and parser, which might make it simpler. I won't lose a lot of sleep if we decide to rip out '!' as well, but I don't think that continuing to support it would cost us much. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Commits
-
Remove precedence hacks no longer needed without postfix operators.
- 28a61fc6c58f 14.0 landed
-
Allow most keywords to be used as column labels without requiring AS.
- 06a7c3154f5b 14.0 landed
-
Remove support for postfix (right-unary) operators.
- 1ed6b895634c 14.0 landed
-
Remove factorial operators, leaving only the factorial() function.
- 76f412ab3105 14.0 landed
-
Further refine patch for commenting operator implementation functions.
- 908ab8028640 9.1.0 cited