pub struct Function {Show 26 fields
pub oid: u32,
pub name: String,
pub namespace: u32,
pub owner: u32,
pub lang: u32,
pub cost: f32,
pub rows: u32,
pub support: u32,
pub kind: u8,
pub strict: bool,
pub leakproof: bool,
pub volatile: u8,
pub parallel: u8,
pub rettype: u32,
pub retset: bool,
pub argtypes: Vec<u32>,
pub allargtypes: Vec<u32>,
pub argmodes: Vec<u8>,
pub argnames: Vec<String>,
pub argdefaults: Option<String>,
pub nargdefaults: i16,
pub src: String,
pub bin: String,
pub body: Option<FunctionBody>,
pub config: Vec<String>,
pub secdef: bool,
}Expand description
A function, one row of pg_proc: a function of the setup of a new cluster, such as a function in SQL of information_schema, or a function that CREATE FUNCTION makes.
Fields§
§oid: u32The OID. Catalog::create_function sets it.
name: StringThe name.
namespace: u32The OID of the schema.
owner: u32The OID of the owner role.
lang: u32prolang: the OID of the language.
cost: f32procost: the cost in units of cpu_operator_cost, a positive number.
rows: u32prorows: the number of rows of a function that returns a set, or 0.
support: u32prosupport: the OID of the support function, or 0.
kind: u8prokind: f for a function, p for a procedure or a for an aggregate.
strict: boolproisstrict: true when a null argument gives null without a call.
leakproof: boolproleakproof: true when the function has no side effects and gives no information about its arguments other than its result.
volatile: u8provolatile: i immutable, s stable or v volatile.
parallel: u8proparallel: s safe, r restricted or u unsafe.
rettype: u32prorettype: the OID of the result type.
retset: boolproretset: true when the function returns a set.
argtypes: Vec<u32>proargtypes: the types of the input arguments.
allargtypes: Vec<u32>proallargtypes: the types of all the arguments, with the OUT arguments. The list is empty when all the arguments are input arguments.
argmodes: Vec<u8>proargmodes: the mode of each argument, i, o, b or t. The list is empty when all the arguments are input arguments.
argnames: Vec<String>proargnames: the name of each argument, with an empty name for an argument without a name. The list is empty when no argument has a name.
argdefaults: Option<String>proargdefaults: the defaults of the last input arguments, in the stored form of a list of expressions, or None when no argument has a default.
nargdefaults: i16pronargdefaults: the number of the defaults in argdefaults.
src: Stringprosrc: the body in a string, or empty for a body in SQL.
bin: Stringprobin: the file of a function in C, or empty for another function.
body: Option<FunctionBody>The text of the statement that made the function, or None.
config: Vec<String>proconfig: the settings that apply during a call, each one as name=value, with the name of the parameter as PostgreSQL spells it.
secdef: boolprosecdef: true for SECURITY DEFINER, which runs the function as its owner.