Subject: Get CTID from within an OUTPUT/SEND function

From: Garfield Lewis <[email-masked]>
Date: Wed, 5 Mar 2025 00:09:03 +0000

I would like to know if it is possible to get the CTID from within the OUTPUT and SEND functions of a CREATE TYPE? I’ve found a function called currtid_byrelname and the comment in the function prolog says it is to get a CTID but I cannot find any example usage of it.

Regards,
Garfield

---

From: Tom Lane <[email-masked]>
Date: Tue, 04 Mar 2025 19:33:04 -0500

Garfield Lewis <[email-masked]> writes:
> I would like to know if it is possible to get the CTID from within
> the OUTPUT and SEND functions of a CREATE TYPE?

No.  A datatype output function has no reason to expect that the value
it's handed has ever been in a table at all.

			regards, tom lane