Create a new function - postgres docs
Arguments:
-
function_name
[Name] - name of the new function -
function_params
[array] - parameters of the new functionEither array of strings or objects. If array of strings, it is interpreted as is, if array of objects:
mode
[string] -IN
,OUT
,INOUT
, orVARIADIC
name
[string] - name of argumenttype
[string] - datatype of argumentdefault
[string] - default value of argument
-
function_options
[object] - options:returns
[string] - returns clauselanguage
[string] - language name of function definitionreplace
[boolean] - create or replace functionwindow
[boolean] - window functionbehavior
[string] -IMMUTABLE
,STABLE
, orVOLATILE
onNull
[boolean] -RETURNS NULL ON NULL INPUT
parallel
[string] -UNSAFE
,RESTRICTED
, orSAFE
-
definition
[string] - definition of function
Reverse Operation: dropFunction
Drop a function - postgres docs
Arguments:
function_name
[Name] - name of the function to dropfunction_params
[array] - seedrop_options
[object] - options:ifExists
[boolean] - drops function only if it existscascade
[boolean] - drops also dependent objects
Rename a function - postgres docs
Arguments: