pub struct PgProc {Show 31 fields
pub oid: Str,
pub proname: Str,
pub pronamespace: Str,
pub proowner: Str,
pub prolang: Str,
pub procost: Option<NotNan<f32>>,
pub prorows: Option<NotNan<f32>>,
pub provariadic: Option<Str>,
pub prosupport: Option<Str>,
pub prokind: PgProcProkind,
pub prosecdef: bool,
pub proleakproof: bool,
pub proisstrict: bool,
pub proretset: bool,
pub provolatile: PgProcProvolatile,
pub proparallel: PgProcProparallel,
pub pronargs: u16,
pub pronargdefaults: u16,
pub prorettype: Str,
pub proargtypes: Vec<Str>,
pub proallargtypes: Option<Vec<Str>>,
pub proargmodes: Option<Vec<PgProcProargmodes>>,
pub proargnames: Option<Vec<Str>>,
pub proargdefaults: Option<Vec<Option<Str>>>,
pub protrftypes: Option<Vec<Str>>,
pub prosrc: Option<Str>,
pub probin: Option<Str>,
pub prosqlbody: Option<Str>,
pub proconfig: Option<Vec<Str>>,
pub proacl: Option<Vec<FunctionAclItem>>,
pub description: Option<Str>,
}Expand description
The DDL-only contents of pg_proc
Fields§
§oid: Stroid Row identifier
proname: Strname Name of the function
pronamespace: Stroid (references pg_namespace.oid) The OID of the namespace that contains this function
proowner: Stroid (references pg_authid.oid) Owner of the function
prolang: Stroid (references pg_language.oid) Implementation language or call interface of this function
procost: Option<NotNan<f32>>float4 Estimated execution cost (in units of cpu_operator_cost); if proretset, this is cost per row returned
prorows: Option<NotNan<f32>>float4 Estimated number of result rows (zero if not proretset)
provariadic: Option<Str>oid (references pg_type.oid) Data type of the variadic array parameter’s elements, or zero if the function does not have a variadic parameter
prosupport: Option<Str>regproc (references pg_proc.oid) Planner support function for this function (see Section 36.11), or zero if none
prokind: PgProcProkindchar f for a normal function, p for a procedure, a for an aggregate function, or w for a window function
prosecdef: boolbool Function is a security definer (i.e., a “setuid” function)
proleakproof: boolbool The function has no side effects. No information about the arguments is conveyed except via the return value. Any function that might throw an error depending on the values of its arguments is not leak-proof.
proisstrict: boolbool Function returns null if any call argument is null. In that case the function won’t actually be called at all. Functions that are not “strict” must be prepared to handle null inputs.
proretset: boolbool Function returns a set (i.e., multiple values of the specified data type)
provolatile: PgProcProvolatilechar provolatile tells whether the function’s result depends only on its input arguments, or is affected by outside factors. It is i for “immutable” functions, which always deliver the same result for the same inputs. It is s for “stable” functions, whose results (for fixed inputs) do not change within a scan. It is v for “volatile” functions, whose results might change at any time. (Use v also for functions with side-effects, so that calls to them cannot get optimized away.)
proparallel: PgProcProparallelchar proparallel tells whether the function can be safely run in parallel mode. It is s for functions which are safe to run in parallel mode without restriction. It is r for functions which can be run in parallel mode, but their execution is restricted to the parallel group leader; parallel worker processes cannot invoke these functions. It is u for functions which are unsafe in parallel mode; the presence of such a function forces a serial execution plan.
pronargs: u16int2 Number of input arguments
pronargdefaults: u16int2 Number of arguments that have defaults
prorettype: Stroid (references pg_type.oid) Data type of the return value
proargtypes: Vec<Str>§proallargtypes: Option<Vec<Str>>oid[] (references pg_type.oid) An array of the data types of the function arguments. This includes all arguments (including OUT and INOUT arguments); however, if all the arguments are IN arguments, this field will be null. Note that subscripting is 1-based, whereas for historical reasons proargtypes is subscripted from 0.
proargmodes: Option<Vec<PgProcProargmodes>>char[] An array of the modes of the function arguments, encoded as i for IN arguments, o for OUT arguments, b for INOUT arguments, v for VARIADIC arguments, t for TABLE arguments. If all the arguments are IN arguments, this field will be null. Note that subscripts correspond to positions of proallargtypes not proargtypes.
proargnames: Option<Vec<Str>>text[] An array of the names of the function arguments. Arguments without a name are set to empty strings in the array. If none of the arguments have a name, this field will be null. Note that subscripts correspond to positions of proallargtypes not proargtypes.
proargdefaults: Option<Vec<Option<Str>>>pg_node_tree Expression trees (in nodeToString() representation) for default values. This is a list with pronargdefaults elements, corresponding to the last N input arguments (i.e., the last N proargtypes positions). If none of the arguments have defaults, this field will be null.
protrftypes: Option<Vec<Str>>oid[] (references pg_type.oid) An array of the argument/result data type(s) for which to apply transforms (from the function’s TRANSFORM clause). Null if none.
prosrc: Option<Str>text This tells the function handler how to invoke the function. It might be the actual source code of the function for interpreted languages, a link symbol, a file name, or just about anything else, depending on the implementation language/call convention.
probin: Option<Str>text Additional information about how to invoke the function. Again, the interpretation is language-specific.
prosqlbody: Option<Str>pg_node_tree Pre-parsed SQL function body. This is used for SQL-language functions when the body is given in SQL-standard notation rather than as a string literal. It’s null in other cases.
proconfig: Option<Vec<Str>>text[] Function’s local settings for run-time configuration variables
proacl: Option<Vec<FunctionAclItem>>aclitem[] Access privileges; see Section 5.8 for details
description: Option<Str>text The comment from pg_description
Trait Implementations§
Source§impl<'de> Deserialize<'de> for PgProc
impl<'de> Deserialize<'de> for PgProc
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Equivalent<PgProc> for Str
impl Equivalent<PgProc> for Str
Source§fn equivalent(&self, key: &PgProc) -> bool
fn equivalent(&self, key: &PgProc) -> bool
key and return true if they are equal.Source§impl Equivalent<PgProc> for str
impl Equivalent<PgProc> for str
Source§fn equivalent(&self, key: &PgProc) -> bool
fn equivalent(&self, key: &PgProc) -> bool
key and return true if they are equal.impl Eq for PgProc
impl StructuralPartialEq for PgProc
Auto Trait Implementations§
impl Freeze for PgProc
impl RefUnwindSafe for PgProc
impl Send for PgProc
impl Sync for PgProc
impl Unpin for PgProc
impl UnsafeUnpin for PgProc
impl UnwindSafe for PgProc
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.