diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2020-08-30 16:03:20 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2020-08-30 16:03:20 -0400 |
commit | cc8a71e93084487e2b7796483ef0b71c1ba79678 (patch) | |
tree | 86e3f634516db33a4b929fadb4de2b671540a462 | |
parent | fabd2f9c944376e154a01a77eb06a55991cc4f40 (diff) | |
download | postgresql-cc8a71e93084487e2b7796483ef0b71c1ba79678.tar.gz postgresql-cc8a71e93084487e2b7796483ef0b71c1ba79678.zip |
Mark factorial operator, and postfix operators in general, as deprecated.
Back-patch key parts of 4c5cf5431 and 6ca547cf7 into stable branches.
I didn't touch pg_description entries here, so it's purely a docs
change; and I didn't fool with any examples either. The main point
is so that anyone who's wondering if factorial() exists in the stable
branches will be reassured.
Mark Dilger and John Naylor, with some adjustments by me
Discussion: https://postgr.es/m/BE2DF53D-251A-4E26-972F-930E523580E9@enterprisedb.com
-rw-r--r-- | doc/src/sgml/func.sgml | 19 | ||||
-rw-r--r-- | doc/src/sgml/ref/create_operator.sgml | 9 |
2 files changed, 25 insertions, 3 deletions
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 094b0df7fc4..9d34bc0282c 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -524,14 +524,16 @@ <row> <entry> <literal>!</literal> </entry> - <entry>factorial</entry> + <entry>factorial + (deprecated, use <function>factorial()</function> instead)</entry> <entry><literal>5 !</literal></entry> <entry><literal>120</literal></entry> </row> <row> <entry> <literal>!!</literal> </entry> - <entry>factorial (prefix operator)</entry> + <entry>factorial as a prefix operator + (deprecated, use <function>factorial()</function> instead)</entry> <entry><literal>!! 5</literal></entry> <entry><literal>120</literal></entry> </row> @@ -717,6 +719,19 @@ <row> <entry> <indexterm> + <primary>factorial</primary> + </indexterm> + <literal><function>factorial(<type>bigint</type>)</function></literal> + </entry> + <entry><type>numeric</type></entry> + <entry>factorial</entry> + <entry><literal>factorial(5)</literal></entry> + <entry><literal>120</literal></entry> + </row> + + <row> + <entry> + <indexterm> <primary>floor</primary> </indexterm> <literal><function>floor(<type>dp</type> or <type>numeric</type>)</function></literal> diff --git a/doc/src/sgml/ref/create_operator.sgml b/doc/src/sgml/ref/create_operator.sgml index 818e3a2315a..73ccac7fecf 100644 --- a/doc/src/sgml/ref/create_operator.sgml +++ b/doc/src/sgml/ref/create_operator.sgml @@ -87,11 +87,18 @@ CREATE OPERATOR <replaceable>name</replaceable> ( <para> At least one of <literal>LEFTARG</> and <literal>RIGHTARG</> must be defined. For - binary operators, both must be defined. For right unary + binary operators, both must be defined. For right unary operators, only <literal>LEFTARG</> should be defined, while for left unary operators only <literal>RIGHTARG</> should be defined. </para> + <note> + <para> + Right unary, also called postfix, operators are deprecated and will be + removed in <productname>PostgreSQL</productname> version 14. + </para> + </note> + <para> The <replaceable class="parameter">function_name</replaceable> procedure must have been previously defined using <command>CREATE |