power()

A function function for calculating the exponentiation of two values

power() is a system function for calculating the exponentiation of two values.

power() was added in PostgreSQL 6.5.

Usage

power ( numeric, numeric ) → numeric
power ( double precision, double precision ) → double precision

pow() is an undocumented alias for power().

numeric_power() is an undocumented alias for the numeric form of power().

Change history

Examples

Usage examples for power():

postgres=# SELECT power(2.5, 2);
       power        
--------------------
 6.2500000000000000
(1 row)

postgres=# SELECT power(2.5::double precision, 2);
 power 
-------
  6.25
(1 row)

Categories

System function