Re: factorial function/phase out postfix operators? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: factorial function/phase out postfix operators?
Date
Msg-id 3029388.1598537044@sss.pgh.pa.us
Whole thread Raw
In response to Re: factorial function/phase out postfix operators?  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: factorial function/phase out postfix operators?  (Mark Dilger <mark.dilger@enterprisedb.com>)
Re: factorial function/phase out postfix operators?  (Robert Haas <robertmhaas@gmail.com>)
Re: factorial function/phase out postfix operators?  (John Naylor <john.naylor@2ndquadrant.com>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> Yeah, that looks like a good spot. I think we should also add
> something to the documentation of the factorial operator, mentioning
> that it will be going away. Perhaps we can advise people to write !!3
> instead of 3! for forward-compatibility, or maybe we should instead
> suggest numeric_fac(3).

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).

            regards, tom lane



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Support for OUT parameters in procedures
Next
From: Mark Dilger
Date:
Subject: Re: factorial function/phase out postfix operators?