Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nAbby-0004hC-J6 for pgsql-general@arkaria.postgresql.org; Thu, 20 Jan 2022 17:52:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nAbbw-0003IO-SL for pgsql-general@arkaria.postgresql.org; Thu, 20 Jan 2022 17:52:36 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nAbbw-0003Hl-Hx for pgsql-general@lists.postgresql.org; Thu, 20 Jan 2022 17:52:36 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nAbbu-0001aV-At for pgsql-general@postgresql.org; Thu, 20 Jan 2022 17:52:35 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 20KHqROc890420; Thu, 20 Jan 2022 12:52:27 -0500 From: Tom Lane To: Garfield Lewis cc: Laurenz Albe , PostgreSQL mailing lists Subject: Re: [EXT] Re: Can we get the CTID value In-reply-to: References: <0745A2E3-4DD9-46E9-8E77-7CA95C7ECC63@lzlabs.com> Comments: In-reply-to Garfield Lewis message dated "Thu, 20 Jan 2022 17:00:36 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <890418.1642701147.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 20 Jan 2022 12:52:27 -0500 Message-ID: <890419.1642701147@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Garfield Lewis 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 dat= abase 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