A function is an identifier which instructs PostgreSQL to perform a programmatic operation within a SQL statement, and then return a value from that operation. The returned value is substituted into the SQL statement in place of the typed function name, similarly to the way the results from operators are (in fact, technically, operators themselves are just syntactic pointers to built-in system functions).

To use a function, you need only pass the function name, followed by its list of arguments (if any are required) which are enclosed in parentheses, and delimited by commas. What specific arguments you need to pass will depend completely on the function, and its requirements, but the general format is the same.

 function_name (argument1 , argument2 ...) 

PostgreSQL defines a rich set of functions for its built-in data types. To view a complete list of functions available, you may type \df within psql .