CREATE FUNCTION name ( argName ] type [ { DEFAULT | = } defaultExpression ] [, ...] ] )
[ RETURNS type ]
{ LANGUAGE languageName | IMMUTABLE | STABLE
| VOLATILE | CALLED ON NULL INPUT | RETURNS NULL ON NULL INPUT
| STRICT | COST executionCost | ROWS resultRows

IMMUTABLE cannot modify the database and always returns the same result

STABLE cannot modify the database and within a single table scan it will consistently
return the same result

VOLATILE value can change

CALLED ON NULL INPUT
RETURNS NULL ON NULL INPUT or STRICT

CREATE FUNCTION add(integer, integer) RETURNS integer
    AS 'select $1 + $2;'
    LANGUAGE SQL
    IMMUTABLE
    RETURNS NULL ON NULL INPUT;

CREATE OR REPLACE FUNCTION increment(i integer) RETURNS integer AS $$
        BEGIN
                RETURN i + 1;
        END;
$$ LANGUAGE ...;

create alias newFunctionAliasName [ DETERMINISTIC ]
as
FOR classAndMethodName

