Skip to content

PgFunctionInfo

Namespace: Ankus

Assembly: Ankus.Runtime.dll

Holds an immutable, detached snapshot of the function metadata exposed by pgrx’s PgProc.

public sealed class PgFunctionInfo

Catalog strings and arrays are copied before the native cache pin is released. This snapshot survives catalog changes and backend callbacks; obtain another snapshot to observe changes. Default expression trees require a live backend and an explicit memory-context owner.

Inheritance: object

Gets all argument types, including OUT and TABLE arguments.

public IReadOnlyList<uint> AllArgumentTypeOids { get; }

Value: IReadOnlyList<uint>

Gets all argument modes, including synthesized IN modes when the catalog array is absent.

public IReadOnlyList<PgArgumentMode> ArgumentModes { get; }

Value: IReadOnlyList<PgArgumentMode>

Gets argument names, retaining empty names and synthesizing null input names when the catalog array is absent.

public IReadOnlyList<string?> ArgumentNames { get; }

Value: IReadOnlyList<string>

Gets additional language-specific invocation information, or null.

public string? Binary { get; }

Value: string

Gets the function-local configuration settings, or null when absent.

public IReadOnlyList<string>? Configuration { get; }

Value: IReadOnlyList<string>

Gets the estimated cost in cpu_operator_cost units, per row for a set.

public float Cost { get; }

Value: float

Gets the number of trailing input arguments with defaults.

public int DefaultArgumentCount { get; }

Value: int

Gets the number of input arguments, including INOUT and VARIADIC.

public int InputArgumentCount { get; }

Value: int

Gets the ordered input signature, including INOUT and VARIADIC arguments.

public IReadOnlyList<uint> InputArgumentTypeOids { get; }

Value: IReadOnlyList<uint>

Gets whether the function is declared leakproof.

public bool IsLeakProof { get; }

Value: bool

Gets whether invocation uses the owner’s privileges.

public bool IsSecurityDefiner { get; }

Value: bool

Gets whether a null input prevents invocation and produces SQL NULL.

public bool IsStrict { get; }

Value: bool

Gets whether this row describes a function, procedure, aggregate or window function.

public PgFunctionKind Kind { get; }

Value: PgFunctionKind

Gets the implementation language OID.

public uint LanguageOid { get; }

Value: uint

Gets the routine’s catalog OID.

public uint Oid { get; }

Value: uint

Gets the owning role’s OID.

public uint OwnerOid { get; }

Value: uint

Gets the declared parallel execution safety.

public PgParallelSafety ParallelSafety { get; }

Value: PgParallelSafety

Gets the declared return type OID.

public uint ReturnTypeOid { get; }

Value: uint

Gets whether the function returns multiple values.

public bool ReturnsSet { get; }

Value: bool

Gets the estimated result row count, or zero for a scalar.

public float Rows { get; }

Value: float

Gets the language-specific implementation source or entry symbol.

public string Source { get; }

Value: string

Gets the planner support function OID, or zero when absent.

public uint SupportFunctionOid { get; }

Value: uint

Gets the variadic element type, or null when no variadic parameter exists.

public uint? VariadicElementTypeOid { get; }

Value: uint?

Gets the declared volatility.

public PgVolatility Volatility { get; }

Value: PgVolatility

Parses the captured defaults into actual PostgreSQL expression trees without evaluating them.

public PgList<nint>? GetDefaultArguments(PgMemoryContext context)

Parameters:

context — PgMemoryContext

The explicit owner of the list and every expression node.

Returns: PgList<nint>

Null when no defaults exist; otherwise the ordered last N input defaults.

Dispose the returned list to release its container. Nodes remain owned by the context until reset or deletion. Raw pointers require selected-version native node layouts and must never outlive the context. Each call creates independent native trees.