diff --git a/pgrx/src/datum/mod.rs b/pgrx/src/datum/mod.rs index 9a07fa110..16c31be17 100644 --- a/pgrx/src/datum/mod.rs +++ b/pgrx/src/datum/mod.rs @@ -150,12 +150,13 @@ impl<'src> Datum<'src> { /// Implemented automatically by `#[derive(PostgresType)]` pub trait PostgresType {} -/// Creates a [`Vec`] containing identifiers of the provded types. +/// Creates an array of [`pg_sys::Oid`] with the OID of each provided type /// /// # Examples /// /// ``` /// use pgrx::{oids_of, datum::IntoDatum}; +/// /// let oids = oids_of![i32, f64]; /// assert_eq!(oids[0], i32::type_oid().into()); /// assert_eq!(oids[1], f64::type_oid().into()); @@ -168,6 +169,7 @@ pub trait PostgresType {} #[macro_export] macro_rules! oids_of { () =>( + // avoid coercions to an ambiguously-typed array or slice [$crate::pg_sys::PgOid::Invalid; 0] ); ($($t:path),+ $(,)?) => (