pgrx icon indicating copy to clipboard operation
pgrx copied to clipboard

HeapTuple::get_by_index is not callable with array type

Open semtexzv opened this issue 1 year ago • 8 comments

I'd like to read arrays from tuples, but the method bound requires T: IntoDatum, which Array<'_, T> is not.

Method signature:

pub fn get_by_index<T: FromDatum + IntoDatum + 'static>(
    &self,
    attno: NonZeroUsize,
) -> Result<Option<T>, TryFromDatumError> {

}

Is this just an oversight, or is there an underyling reason why this isn't pssible?

semtexzv avatar Dec 14 '22 21:12 semtexzv