Unsupported versions: 6.5
This documentation is for an unsupported version of PostgreSQL.
You may want to view the same page for the current version, or one of the other supported versions listed above instead.

Numerical Operators

Table 4-3. Postgres Numerical Operators

Operator Description Usage
! Factorial 3 !
!! Factorial (left operator) !! 3
% Modulo 5 % 4
% Truncate % 4.5
* Multiplication 2 * 3
+ Addition 2 + 3
- Subtraction 2 - 3
/ Division 4 / 2
: Natural Exponentiation : 3.0
; Natural Logarithm (; 5.0)
@ Absolute value @ -5.0
^ Exponentiation 2.0 ^ 3.0
|/ Square root |/ 25.0
||/ Cube root ||/ 27.0