From: Tom Lane <tgl@sss.pgh.pa.us>
To: Stephen Frost <sfrost@snowman.net>
Cc: Guyren Howe <guyren@gmail.com>
Cc: PG-General Mailing List <pgsql-general@postgresql.org>
Subject: Re: Thoughts on user-defined types for talk at Postgres conference?
Date: Thu, 07 Mar 2024 02:12:20 -0500
Message-ID: <453185.1709795540@sss.pgh.pa.us> (raw)
In-Reply-To: <ZelhHfegWHMoF+eE@tamriel.snowman.net>
References: <506dd5f4-65fe-4d34-8cfe-2ebc08b978e4@Spark>
<ZeirvYIUOXpgocLo@tamriel.snowman.net>
<e7d2ee82-92f0-4def-8535-e778d8e9a9dd@Spark>
<ZelhHfegWHMoF+eE@tamriel.snowman.net>
Stephen Frost <sfrost@snowman.net> writes:
> * Guyren Howe (guyren@gmail.com) wrote:
>> It seems as though a Composite Type having only fixed-length fields should be able to be regarded as a fixed-length value.
> While I can understand where you're coming from with that, it's
> certainly not something the system is built to handle today and, at
> least from my recent review of this area, looks like there would be a
> fair bit of code involved to get to that point.
There are some other fundamental problems here:
* To conclude that a tuple of only fixed-length column types is
itself fixed-length, you need an additional assumption that all
the columns are not-null. This is pretty problematic because
we don't even have a way to enforce such a requirement against
generic composite types; we really only promise to enforce
column constraints against columns of physical tables.
* Even if all the semantic enforcement of that were bulletproof,
we'd still have a big problem with compatibility of the on-disk
representation between current releases and a future release
that thought it could elide some part of the tuple header for
all-not-null stored composite values.
I don't say that these problems are insoluble, but they do
look pretty difficult.
regards, tom lane
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, sfrost@snowman.net, guyren@gmail.com
Subject: Re: Thoughts on user-defined types for talk at Postgres conference?
In-Reply-To: <453185.1709795540@sss.pgh.pa.us>
References: <506dd5f4-65fe-4d34-8cfe-2ebc08b978e4@Spark> <ZeirvYIUOXpgocLo@tamriel.snowman.net> <e7d2ee82-92f0-4def-8535-e778d8e9a9dd@Spark> <ZelhHfegWHMoF+eE@tamriel.snowman.net> <453185.1709795540@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