Re: [EXT] Re: Can we get the CTID value

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Garfield Lewis <garfield(dot)lewis(at)lzlabs(dot)com>
Cc: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, PostgreSQL mailing lists <pgsql-general(at)postgresql(dot)org>
Subject: Re: [EXT] Re: Can we get the CTID value
Date: 2022-01-20 18:11:04
Message-ID: 892316.1642702264@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Garfield Lewis <garfield(dot)lewis(at)lzlabs(dot)com> writes:
> I think you are right in the case of INPUT/RECEIVE, however we should be able to get that info during OUTPUT/SEND (I think) since it is fixed at that point. At the time I return the information to the user I could augment the output to add that information to the output. However, I still don't know if it is even possible to get that information in those functions. Is that at all possible?

No, it's the same problem in reverse: the output function cannot
know where the value came from. There is no hard and fast
reason that it must have come out of a table, either. Consider
something as simple as

SELECT 'blah blah'::yourtype;

This'll invoke the type's input function to parse the literal string,
and later it'll invoke the output function to reconstruct a string
to send to the client, and there's no table involved.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Garfield Lewis 2022-01-20 18:36:08 Re: [EXT] Re: Can we get the CTID value
Previous Message Garfield Lewis 2022-01-20 18:00:53 Re: [EXT] Re: Can we get the CTID value