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 12:52:27 -0500
Message-ID: <890419.1642701147@sss.pgh.pa.us> (raw)
In-Reply-To: <BB8E7CE4-B2A3-409A-9D48-75F42EC2D2CA@lzlabs.com>
References: <0745A2E3-4DD9-46E9-8E77-7CA95C7ECC63@lzlabs.com>
	<dbe1e5fb1c46b98a0016ff5898cf51e243b15995.camel@cybertec.at>
	<BB8E7CE4-B2A3-409A-9D48-75F42EC2D2CA@lzlabs.com>

Garfield Lewis <garfield.lewis@lzlabs.com> writes:
> I need the page and possibly row of the data location to be stored as an element of the new type. This is to simulate a structure from another database system.

You need to rethink.  The datatype input function cannot know even that
the value is going to be stored anywhere, let alone exactly where.
Moreover, what would happen if the row is moved somewhere else due
to an update of some other column?

You might be able to build something for cross-linking by putting
the logic in AFTER INSERT/UPDATE/DELETE triggers, but I think a
custom datatype is not going to be helpful for that.

			regards, tom lane





view thread (12+ messages)  latest in thread

Message-ID: <890419.1642701147@sss.pgh.pa.us>
Permalink:  ../890419.1642701147@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/890419.1642701147@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: <890419.1642701147@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>

* 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