Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9dee85b

Browse files
committed
Mark factorial operator, and postfix operators in general, as deprecated.
Back-patch key parts of4c5cf54 and6ca547c into stable branches.I didn't touch pg_description entries here, so it's purely a docschange; and I didn't fool with any examples either. The main pointis so that anyone who's wondering if factorial() exists in the stablebranches will be reassured.Mark Dilger and John Naylor, with some adjustments by meDiscussion:https://postgr.es/m/BE2DF53D-251A-4E26-972F-930E523580E9@enterprisedb.com
1 parentff3c16d commit9dee85b

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed

‎doc/src/sgml/func.sgml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -666,14 +666,16 @@
666666

667667
<row>
668668
<entry> <literal>!</literal> </entry>
669-
<entry>factorial</entry>
669+
<entry>factorial
670+
(deprecated, use <function>factorial()</function> instead)</entry>
670671
<entry><literal>5 !</literal></entry>
671672
<entry><literal>120</literal></entry>
672673
</row>
673674

674675
<row>
675676
<entry> <literal>!!</literal> </entry>
676-
<entry>factorial (prefix operator)</entry>
677+
<entry>factorial as a prefix operator
678+
(deprecated, use <function>factorial()</function> instead)</entry>
677679
<entry><literal>!! 5</literal></entry>
678680
<entry><literal>120</literal></entry>
679681
</row>
@@ -856,6 +858,19 @@
856858
<entry><literal>2.71828182845905</literal></entry>
857859
</row>
858860

861+
<row>
862+
<entry>
863+
<indexterm>
864+
<primary>factorial</primary>
865+
</indexterm>
866+
<literal><function>factorial(<type>bigint</type>)</function></literal>
867+
</entry>
868+
<entry><type>numeric</type></entry>
869+
<entry>factorial</entry>
870+
<entry><literal>factorial(5)</literal></entry>
871+
<entry><literal>120</literal></entry>
872+
</row>
873+
859874
<row>
860875
<entry>
861876
<indexterm>

‎doc/src/sgml/ref/create_operator.sgml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,18 @@ CREATE OPERATOR <replaceable>name</replaceable> (
8787

8888
<para>
8989
At least one of <literal>LEFTARG</literal> and <literal>RIGHTARG</literal> must be defined. For
90-
binary operators, both must be defined. For rightunary
90+
binary operators, both must be defined. For right unary
9191
operators, only <literal>LEFTARG</literal> should be defined, while for left
9292
unary operators only <literal>RIGHTARG</literal> should be defined.
9393
</para>
9494

95+
<note>
96+
<para>
97+
Right unary, also called postfix, operators are deprecated and will be
98+
removed in <productname>PostgreSQL</productname> version 14.
99+
</para>
100+
</note>
101+
95102
<para>
96103
The <replaceable class="parameter">function_name</replaceable>
97104
function must have been previously defined using <command>CREATE

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp