public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tom Lane <[email protected]>
To: Michel Pelletier <[email protected]>
Cc: pgsql-general <[email protected]>
Subject: Re: Using Expanded Objects other than Arrays from plpgsql
Date: Sun, 20 Oct 2024 15:19:00 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <CACxu=vLE1AWwz4cQGv-moKGOCYQrXyMhxBX_myBOyK42mrx2BA@mail.gmail.com>
References: <CACxu=vJaKFNsYxooSnW1wEgsAO5u_v1XYBacfVJ14wgJV_PYeg@mail.gmail.com>
<[email protected]>
<CACxu=vLE1AWwz4cQGv-moKGOCYQrXyMhxBX_myBOyK42mrx2BA@mail.gmail.com>
Michel Pelletier <[email protected]> writes:
> On Sun, Oct 20, 2024 at 10:13 AM Tom Lane <[email protected]> wrote:
>> The other problem is that plpgsql only knows how to do such expansion
>> for arrays, and it's not obvious how to extend that part.
> Perhaps a third member function for ExpandedObjectMethods that formalizes
> the expansion interface like found in DatumGetExpandedArray? I closely
> follow that same pattern in my code.
The trouble is we don't have an expanded object to consult at this
point --- only a flat Datum. plpgsql has hard-wired knowledge that
it's okay to apply expand_array if the datatype passes the typisarray
tests, but I'm pretty unclear on how to provide similar knowledge for
extension datatypes.
regards, tom lane
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Using Expanded Objects other than Arrays from plpgsql
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox