diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index 2262152fd1c..830d71779a5 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -1,5 +1,5 @@
@@ -520,17 +520,13 @@ PostgreSQL documentation
shows the available
mathematical functions. In the table, dp
- indicates double precision. The functions
- exp, ln,
- log, pow,
- round (1 argument), sqrt,
- and trunc (1 argument) are also available for
- the type numeric in place of double
- precision. Functions returning a numeric
- result take numeric input arguments, unless otherwise
- specified. Many of these functions are implemented on top of the
- host system's C library; accuracy and behavior in boundary cases
- could therefore vary depending on the host system.
+ indicates double precision. Many of these functions
+ are provided in multiple forms with different argument types.
+ Except where noted, any given form of a function returns the same
+ datatype as its argument.
+ The functions working with double precision data are mostly
+ implemented on top of the host system's C library; accuracy and behavior in
+ boundary cases may therefore vary depending on the host system.
@@ -564,8 +560,8 @@ PostgreSQL documentation
- ceil(numeric)
- numeric
+ ceil(dp or numeric)
+ (same as input)
smallest integer not less than argument
ceil(-42.8)
-42
@@ -580,32 +576,32 @@ PostgreSQL documentation
- exp(dp)
- dp
+ exp(dp or numeric)
+ (same as input)
exponential
exp(1.0)
2.71828182845905
- floor(numeric)
- numeric
+ floor(dp or numeric)
+ (same as input)
largest integer not greater than argument
floor(-42.8)
-43
- ln(dp)
- dp
+ ln(dp or numeric)
+ (same as input)
natural logarithm
ln(2.0)
0.693147180559945
- log(dp)
- dp
+ log(dp or numeric)
+ (same as input)
base 10 logarithm
log(100.0)
2
@@ -638,14 +634,23 @@ PostgreSQL documentation
- pow(e dp,
- n dp)
+ pow(x dp,
+ e dp)
dp
raise a number to exponent e
pow(9.0, 3.0)
729
+
+ pow(x numeric,
+ e numeric)
+ numeric
+ raise a number to exponent e
+ pow(9.0, 3.0)
+ 729
+
+
radians(dp)
dp
@@ -657,14 +662,14 @@ PostgreSQL documentation
random()
dp
- value between 0.0 to 1.0
+ random value between 0.0 and 1.0
random()
- round(dp)
- dp
+ round(dp or numeric)
+ (same as input)
round to nearest integer
round(42.4)
42
@@ -686,32 +691,31 @@ PostgreSQL documentation
-->
- sign(numeric)
- numeric
+ sign(dp or numeric)
+ (same as input)
sign of the argument (-1, 0, +1)
sign(-8.4)
-1
- sqrt(dp)
- dp
+ sqrt(dp or numeric)
+ (same as input)
square root
sqrt(2.0)
1.4142135623731
- trunc(dp)
- dp
+ trunc(dp or numeric)
+ (same as input)
truncate toward zero
trunc(42.8)
42
- trunc(numeric,
- r integer)
+ trunc(v numeric, s integer)
numeric
truncate to s decimal places
trunc(42.4382, 2)
@@ -725,7 +729,7 @@ PostgreSQL documentation
Finally, shows the
available trigonometric functions. All trigonometric functions
- have arguments and return values of type double
+ take arguments and return values of type double
precision.
@@ -2043,7 +2047,7 @@ PostgreSQL documentation
This section describes functions and operators for examining and
- manipulating binary string values. Strings in this context include
+ manipulating binary string values. Strings in this context mean
values of the type BYTEA.
@@ -2146,7 +2150,8 @@ PostgreSQL documentation
- set_byte(string, offset)
+ set_byte(string,
+ offset, newvalue>)
bytea
Set byte in string.
@@ -2172,7 +2177,8 @@ PostgreSQL documentation
- set_bit(string, offset)
+ set_bit(string,
+ offset, newvalue>)
bytea
Set bit in string.