pub struct ExtensionOids {
pub vector: Option<u32>,
pub enums: HashSet<u32>,
pub domains: HashMap<u32, u32>,
pub arrays: HashSet<u32>,
}Expand description
Per-database type OIDs, discovered once at connect time and threaded through decode calls.
Everything in here is assigned by the local database rather than fixed by
pg_type.h: extension types get their OID at CREATE EXTENSION time,
and enums and domains get theirs when the migration that declares them
runs. The constants at the top of this module cover the built-in types
whose OIDs are stable everywhere; this covers the rest.
Default means “nothing discovered yet”, under which any OID not in the
built-in set is an Error::UnknownTypeOid rather than a guess — see
decode_value.
Fields§
§vector: Option<u32>pgvector’s vector type, if the extension is installed.
enums: HashSet<u32>Every enum type OID. Postgres sends an enum’s binary value as its
label text, so these decode as Str.
domains: HashMap<u32, u32>Domain OID to the OID of the type it wraps. A domain’s wire format is its base type’s, so these decode by recursing on the base.
arrays: HashSet<u32>Array types whose element is one of the enums or domains above. The
element OID travels in the array’s own binary header, so recognising
the array OID is all decode_array needs; without this an
AuthenticationMethod[] column is an UnknownTypeOid even though
every value in it would decode.
Trait Implementations§
Source§impl Clone for ExtensionOids
impl Clone for ExtensionOids
Source§impl Debug for ExtensionOids
impl Debug for ExtensionOids
Auto Trait Implementations§
impl Freeze for ExtensionOids
impl RefUnwindSafe for ExtensionOids
impl Send for ExtensionOids
impl Sync for ExtensionOids
impl Unpin for ExtensionOids
impl UnsafeUnpin for ExtensionOids
impl UnwindSafe for ExtensionOids
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.