mirror of
https://github.com/postgres/postgres.git
synced 2025-06-11 20:28:21 +03:00
Remove factorial operators, leaving only the factorial() function.
The "!" operator is our only built-in postfix operator. Remove it, on the way to removal of grammar support for postfix operators. There is also a "!!" prefix operator, but since it's been marked deprecated for most of its existence, we might as well remove it too. Also zap the SQL alias function numeric_fac(), which seems to have equally little reason to live. Mark Dilger, based on work by myself and Robert Haas; review by John Naylor Discussion: https://postgr.es/m/38ca86db-42ab-9b48-2902-337a0d6b8311@2ndquadrant.com
This commit is contained in:
@ -1048,36 +1048,6 @@ repeat('Pg', 4) <returnvalue>PgPgPgPg</returnvalue>
|
||||
</para></entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry role="func_table_entry"><para role="func_signature">
|
||||
<type>bigint</type> <literal>!</literal>
|
||||
<returnvalue>numeric</returnvalue>
|
||||
</para>
|
||||
<para>
|
||||
Factorial
|
||||
(deprecated, use <link linkend="function-factorial"><function>factorial()</function></link> instead)
|
||||
</para>
|
||||
<para>
|
||||
<literal>5 !</literal>
|
||||
<returnvalue>120</returnvalue>
|
||||
</para></entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry role="func_table_entry"><para role="func_signature">
|
||||
<literal>!!</literal> <type>bigint</type>
|
||||
<returnvalue>numeric</returnvalue>
|
||||
</para>
|
||||
<para>
|
||||
Factorial as a prefix operator
|
||||
(deprecated, use <link linkend="function-factorial"><function>factorial()</function></link> instead)
|
||||
</para>
|
||||
<para>
|
||||
<literal>!! 5</literal>
|
||||
<returnvalue>120</returnvalue>
|
||||
</para></entry>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<entry role="func_table_entry"><para role="func_signature">
|
||||
<literal>@</literal> <replaceable>numeric_type</replaceable>
|
||||
|
Reference in New Issue
Block a user