Skip to content

Commit

Permalink
Remove irrelevant IntoDatum::array_type_oid fn
Browse files Browse the repository at this point in the history
This existed purely to serve Array, and is not necessary.
  • Loading branch information
workingjubilee committed Oct 27, 2023
1 parent dc0d88d commit 549f5ce
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pgrx/src/datum/array.rs
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ impl<'a, T: FromDatum> FromDatum for Array<'a, T> {
}
}

impl<T: IntoDatum + FromDatum> IntoDatum for Array<'_, T> {
impl<T: IntoDatum> IntoDatum for Array<'_, T> {
#[inline]
fn into_datum(self) -> Option<Datum> {
let array_type = self.into_array_type();
Expand All @@ -739,7 +739,7 @@ impl<T: IntoDatum + FromDatum> IntoDatum for Array<'_, T> {

#[inline]
fn type_oid() -> Oid {
T::array_type_oid()
unsafe { pg_sys::get_array_type(T::type_oid()) }
}

fn composite_type_oid(&self) -> Option<Oid> {
Expand Down
3 changes: 0 additions & 3 deletions pgrx/src/datum/into.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ pub trait IntoDatum {
fn composite_type_oid(&self) -> Option<Oid> {
None
}
fn array_type_oid() -> pg_sys::Oid {
unsafe { pg_sys::get_array_type(Self::type_oid()) }
}

/// Is a Datum of this type compatible with another Postgres type?
///
Expand Down

0 comments on commit 549f5ce

Please sign in to comment.