PostgreSQL: Mathematical Functions and Operators
I kind of skipped over the functions/operators section of the PostgreSQL documentation when reading it. I want to review the sections that I think would be useful to me.
References
Notes
Description | Operator |
---|---|
Addition |
|
Unary Plus |
|
Subtraction |
|
Negation |
|
Multiplication |
|
Division |
|
Modulo |
|
Exponentiation |
|
Square Root |
|
Cube Root |
|
Absolute Value |
|
Bitwise AND |
|
Bitwise OR |
|
Bitwise Exclusive OR |
|
Bitwise NOT |
|
Bitwise Shift Left |
|
Bitwise Shift Right |
|
Description | Function |
---|---|
Absolute value |
|
Cube Root |
|
Nearest Integer Greater than or Equal to Argument |
|
Convert Radians to Degrees |
|
Integer Quotient of y/x (truncates towards 0) |
|
Exponential |
|
Factorial |
|
Nearest Integer Less Than or Equal to Argument |
|
Greatest Common Divisor |
|
Least Common Multiple |
|
Natural Logarithm |
|
Logarithm of x to base b |
|
a raised to the power of b |
|
Convert degrees to radians |
|
Round to nearest integer |
|
Truncates v to s decimal places |
|
The random()
and random_normal()
functions below use a deterministic pseudo-random number generator.
Comments
You can read more about how comments are sorted in this blog post.
User Comments
There are currently no comments for this article.