PgTypes
Namespace: Ankus
Assembly: Ankus.Runtime.dll
Resolves PostgreSQL type names through the server’s native regtype input function.
public static class PgTypesInheritance: object
Methods
Section titled “Methods”GetOid(string)
Section titled “GetOid(string)”Resolves PostgreSQL type syntax in the current search path without caching its identity.
public static uint GetOid(string typeName)Parameters:
typeName — string
Native regtype syntax, including quoted names, aliases, arrays, numeric OIDs, or a dash.
Returns: uint
The native OID. A dash or numeric zero returns zero; numeric input need not identify an existing type.
PostgreSQL ignores type modifiers during this lookup. Missing or malformed named types raise PgException. Null, embedded zero characters and invalid UTF-16 are rejected before entering the backend.
GetOidByManagedName<T>()
Section titled “GetOidByManagedName<T>()”Resolves the short CLR metadata name of a statically selected type through PostgreSQL’s regtype parser.
public static uint GetOidByManagedName<T>()Type parameters:
T
The managed type whose name is supplied verbatim.
Returns: uint
The resolved PostgreSQL OID.
This is a name-based convenience corresponding to pgrx’s rust_regtypein helper, not a generated SQL type mapping. Namespace and declaring-type qualifiers are omitted; generic arity and array suffixes remain in Type.Name. PostgreSQL applies its normal unquoted-name rules. SQL renaming, declared schemas and CLR primitive aliases are not inferred.