Skip to content

PgBuiltInOids

Namespace: Ankus

Assembly: Ankus.Runtime.dll

Converts and enumerates pgrx built-in OID constants using an explicit or active PostgreSQL major version.

public static class PgBuiltInOids

Explicit-version overloads work outside PostgreSQL. Other overloads require the calling backend thread and read the selected native headers’ major version. Versions 13 through 19 are supported. Membership is a constant classification, not proof of catalog existence, permissions, or object type.

Inheritance: object

Gets the exact native symbol for a recognized value in the active backend version.

public static string? GetNativeName(PgBuiltInOid value)

Parameters:

value — PgBuiltInOid

The numeric built-in candidate.

Returns: string

The native name, or null when this version does not recognize the value.

Gets the exact selected-version native symbol, including historical renames.

public static string? GetNativeName(PgBuiltInOid value, int postgresMajor)

Parameters:

value — PgBuiltInOid

The numeric built-in candidate, including an explicitly cast unknown value.

postgresMajor — int

The PostgreSQL major version, from 13 through 19.

Returns: string

The native name, or null when this version does not recognize the value.

Gets an immutable snapshot of the active version’s recognized values in numeric order.

public static IReadOnlyList<PgBuiltInOid> GetValues()

Returns: IReadOnlyList<PgBuiltInOid>

The selected catalog members.

Gets an immutable snapshot of one version’s recognized values in numeric order.

public static IReadOnlyList<PgBuiltInOid> GetValues(int postgresMajor)

Parameters:

postgresMajor — int

The PostgreSQL major version, from 13 through 19.

Returns: IReadOnlyList<PgBuiltInOid>

Every recognized member exactly once.

TryFromValue(ulong, out PgBuiltInOid, out PgOidLookupError)

Section titled “TryFromValue(ulong, out PgBuiltInOid, out PgOidLookupError)”

Converts an unsigned datum-sized value without truncation using the active backend version.

public static bool TryFromValue(ulong value, out PgBuiltInOid builtIn, out PgOidLookupError error)

Parameters:

value — ulong

The unsigned input.

builtIn — PgBuiltInOid

The recognized numeric member, or zero on failure.

error — PgOidLookupError

The specific conversion outcome.

Returns: bool

Whether the selected version recognizes the value.

TryFromValue(ulong, int, out PgBuiltInOid, out PgOidLookupError)

Section titled “TryFromValue(ulong, int, out PgBuiltInOid, out PgOidLookupError)”

Converts an unsigned value using a supported major version without requiring a backend.

public static bool TryFromValue(ulong value, int postgresMajor, out PgBuiltInOid builtIn, out PgOidLookupError error)

Parameters:

value — ulong

The unsigned input; values above uint.MaxValue are rejected without truncation.

postgresMajor — int

The PostgreSQL major version, from 13 through 19.

builtIn — PgBuiltInOid

The recognized numeric member, or zero on failure.

error — PgOidLookupError

None, Invalid, Ambiguous, or TooBig.

Returns: bool

Whether conversion succeeded.