diff options
author | Peter Eisentraut <peter@eisentraut.org> | 2020-06-15 08:51:46 +0200 |
---|---|---|
committer | Peter Eisentraut <peter@eisentraut.org> | 2020-06-16 05:04:33 +0200 |
commit | 4c5cf5431410f8e28fb855c892cb2880649df850 (patch) | |
tree | 543ebd1550a6f2e6171bd846a870a82eaae0f32b | |
parent | 3f5863e15664757393c7a1416181fb58deac37a6 (diff) | |
download | postgresql-4c5cf5431410f8e28fb855c892cb2880649df850.tar.gz postgresql-4c5cf5431410f8e28fb855c892cb2880649df850.zip |
doc: Document factorial function
This has existed for a very long time, equivalent to the ! and !!
operators, but it was never documented.
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://www.postgresql.org/message-id/flat/6ce1df0e-86a3-e544-743a-f357ff663f68%402ndquadrant.com
-rw-r--r-- | doc/src/sgml/func.sgml | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index b65aa28f344..9d71678029e 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -1350,6 +1350,23 @@ repeat('Pg', 4) <returnvalue>PgPgPgPg</returnvalue> <row> <entry role="func_table_entry"><para role="func_signature"> <indexterm> + <primary>factorial</primary> + </indexterm> + <function>factorial</function> ( <type>bigint</type> ) + <returnvalue>numeric</returnvalue> + </para> + <para> + Factorial + </para> + <para> + <literal>factorial(5)</literal> + <returnvalue>120</returnvalue> + </para></entry> + </row> + + <row> + <entry role="func_table_entry"><para role="func_signature"> + <indexterm> <primary>floor</primary> </indexterm> <function>floor</function> ( <type>numeric</type> ) |