diff --git a/pgrx-pg-sys/src/submodules/oids.rs b/pgrx-pg-sys/src/submodules/oids.rs index c86129bde..013b0ec0e 100644 --- a/pgrx-pg-sys/src/submodules/oids.rs +++ b/pgrx-pg-sys/src/submodules/oids.rs @@ -67,6 +67,13 @@ impl Oid { Oid(id) } + /// Creates an Oid from an arbitrary u32. + /// + /// This is the same as the [`From::from`] implementation, but available in a `const` context. + pub const fn from_u32(id: u32) -> Oid { + Oid(id) + } + /// Gets an Oid from a u32 if it is a valid builtin declared by Postgres pub const fn from_builtin(id: u32) -> Result { match BuiltinOid::from_u32(id) {