Get CTID from within an OUTPUT/SEND function

Started by Garfield Lewisabout 1 year ago3 messagesgeneral
Jump to latest
#1Garfield Lewis
garfield.lewis@lzlabs.com

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

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Garfield Lewis (#1)
Re: Get CTID from within an OUTPUT/SEND function

Garfield Lewis <garfield.lewis@lzlabs.com> 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

#3Garfield Lewis
garfield.lewis@lzlabs.com
In reply to: Tom Lane (#2)
Re: [EXT] Re: Get CTID from within an OUTPUT/SEND function

Garfield Lewis <garfield.lewis@lzlabs.com> 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

Thx, Tom