Re: Thoughts on user-defined types for talk at Postgres conference? - Mailing list pgsql-general

From Tom Lane
Subject Re: Thoughts on user-defined types for talk at Postgres conference?
Date
Msg-id 683604.1709859108@sss.pgh.pa.us
Whole thread Raw
In response to Re: Thoughts on user-defined types for talk at Postgres conference?  ("Peter J. Holzer" <hjp-pgsql@hjp.at>)
List 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 by date:

Previous
From: "Peter J. Holzer"
Date:
Subject: Re: Thoughts on user-defined types for talk at Postgres conference?
Next
From: sud
Date:
Subject: Question related to partitioning with pg_partman