From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Stephen Frost <sfrost(at)snowman(dot)net> |
Cc: | Guyren Howe <guyren(at)gmail(dot)com>, PG-General Mailing List <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Thoughts on user-defined types for talk at Postgres conference? |
Date: | 2024-03-07 07:12:20 |
Message-ID: | 453185.1709795540@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Stephen Frost <sfrost(at)snowman(dot)net> writes:
> * Guyren Howe (guyren(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Achilleas Mantzios - cloud | 2024-03-07 14:56:18 | pl/pgsql outside the DB, (i.e. on the terminal) possible ? |
Previous Message | Stephen Frost | 2024-03-07 06:39:25 | Re: Thoughts on user-defined types for talk at Postgres conference? |