Re: Thoughts on user-defined types for talk at Postgres conference?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Thoughts on user-defined types for talk at Postgres conference?
Дата
Msg-id 453185.1709795540@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Thoughts on user-defined types for talk at Postgres conference?  (Stephen Frost <sfrost@snowman.net>)
Список pgsql-general
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



В списке pgsql-general по дате отправления:

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: Thoughts on user-defined types for talk at Postgres conference?
Следующее
От: Achilleas Mantzios - cloud
Дата:
Сообщение: pl/pgsql outside the DB, (i.e. on the terminal) possible ?