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 683604.1709859108@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Thoughts on user-defined types for talk at Postgres conference?  ("Peter J. Holzer" <hjp-pgsql@hjp.at>)
Список pgsql-general
"Peter J. Holzer" <hjp-pgsql@hjp.at> writes:
> On 2024-03-06 12:45:33 -0500, Stephen Frost wrote:
>> That's an additional 21 bytes, which is really quite a lot.  What's
>> included in those 21 bytes are
>> [...]
>> the type information (typmod if there is one and the OID of the
>> composite type),

> Is it necessary to store this in every row? Can a column contain
> different composite types?

Operations on type RECORD need to be able to ascertain which concrete
rowtype they're dealing with, so yes the type info is critical in
that case.  Even without that, it wouldn't be terribly practical
to insist on creating a separate copy of record_out (and every other
function that accepts composite types) just so that it could have a
hard-wired notion of what rowtype it's going to deal with.

            regards, tom lane



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

Предыдущее
От: "Peter J. Holzer"
Дата:
Сообщение: Re: Thoughts on user-defined types for talk at Postgres conference?
Следующее
От: sud
Дата:
Сообщение: Question related to partitioning with pg_partman