LOG
Returns the logarithm to the specified base of the argument.
Returns the logarithm to the specified base of the argument. The data type of the return value is the same data type as the passed parameter.
Behavior type
ImmutableSyntax
LOG ( [ base, ] expression )
Arguments
base
- Specifies the base (default is base 10)
expression
- Resolves to a value of type INTEGER or DOUBLE PRECISION.
Examples
=> SELECT LOG(2.0, 64);
LOG
-----
6
(1 row)
SELECT LOG(100);
LOG
-----
2
(1 row)