Re: factorial function/phase out postfix operators?
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: John Naylor <john.naylor@2ndquadrant.com>,
Mark Dilger <mark.dilger@enterprisedb.com>, Vik Fearing <vik@postgresfriends.org>, Peter Eisentraut <peter.eisentraut@2ndquadrant.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2020-08-27T14:19:21Z
Lists: pgsql-hackers
On Thu, Aug 27, 2020 at 10:04 AM Tom Lane <tgl@sss.pgh.pa.us> wrote: > Well, the !! operator itself has been "deprecated" for a long time: > > regression=# \do+ !! > List of operators > Schema | Name | Left arg type | Right arg type | Result type | Function | Description > ------------+------+---------------+----------------+-------------+-------------+--------------------------- > pg_catalog | !! | | bigint | numeric | numeric_fac | deprecated, use ! instead > pg_catalog | !! | | tsquery | tsquery | tsquery_not | NOT tsquery > (2 rows) > > I'm a bit inclined to kill them both off and standardize on factorial() > (not numeric_fac). Works for me. !! hasn't been marked as deprecated in the documentation, only the operator comment, which probably not many people look at. But I don't see a problem updating the documentation now to say: - !! is going away, use factorial() - ! is going away, use factorial() - postfix operators are going away -- 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