diff --git a/src/pgrx_utils.rs b/src/pgrx_utils.rs index 51d09b1..a091c5a 100644 --- a/src/pgrx_utils.rs +++ b/src/pgrx_utils.rs @@ -61,15 +61,18 @@ pub(crate) fn is_array_type(typoid: Oid) -> bool { pub(crate) fn is_supported_array_element_type(_array_element_id: Oid) -> bool { #[cfg(feature = "pg13")] - return u32::from(_array_element_id) < FirstNormalObjectId; - #[cfg(not(feature = "pg13"))] + if u32::from(_array_element_id) >= FirstNormalObjectId { + // we don't support arrays of user-defined composite types in pg 13 + return !is_composite_type(_array_element_id); + } + true } pub(crate) fn is_supported_composite_type(_composite_id: Oid) -> bool { #[cfg(feature = "pg13")] - return u32::from(_composite_id) < FirstNormalObjectId; - #[cfg(not(feature = "pg13"))] + if u32::from(_composite_id) >= FirstNormalObjectId {} + true }