pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Garfield Lewis <garfield.lewis@lzlabs.com>
Cc: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: PostgreSQL mailing lists <pgsql-general@postgresql.org>
Subject: Re: [EXT] Re: Can we get the CTID value
Date: Thu, 20 Jan 2022 13:11:04 -0500
Message-ID: <892316.1642702264@sss.pgh.pa.us> (raw)
In-Reply-To: <6CCE2477-12BB-4287-9CE0-3DBFB3E6652D@lzlabs.com>
References: <0745A2E3-4DD9-46E9-8E77-7CA95C7ECC63@lzlabs.com>
	<dbe1e5fb1c46b98a0016ff5898cf51e243b15995.camel@cybertec.at>
	<BB8E7CE4-B2A3-409A-9D48-75F42EC2D2CA@lzlabs.com>
	<890419.1642701147@sss.pgh.pa.us>
	<6CCE2477-12BB-4287-9CE0-3DBFB3E6652D@lzlabs.com>

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





view thread (12+ messages)  latest in thread

Message-ID: <892316.1642702264@sss.pgh.pa.us>
Permalink:  ../892316.1642702264@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/892316.1642702264@sss.pgh.pa.us

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, garfield.lewis@lzlabs.com, laurenz.albe@cybertec.at
  Subject: Re: [EXT] Re: Can we get the CTID value
  In-Reply-To: <892316.1642702264@sss.pgh.pa.us>
  References: <0745A2E3-4DD9-46E9-8E77-7CA95C7ECC63@lzlabs.com> <dbe1e5fb1c46b98a0016ff5898cf51e243b15995.camel@cybertec.at> <BB8E7CE4-B2A3-409A-9D48-75F42EC2D2CA@lzlabs.com> <890419.1642701147@sss.pgh.pa.us> <6CCE2477-12BB-4287-9CE0-3DBFB3E6652D@lzlabs.com> <892316.1642702264@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox