pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter J. Holzer <hjp-pgsql@hjp.at>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Thoughts on user-defined types for talk at Postgres conference?
Date: Thu, 07 Mar 2024 19:51:48 -0500
Message-ID: <683604.1709859108@sss.pgh.pa.us> (raw)
In-Reply-To: <20240307211655.mqx2pmmyflyb2jlr@hjp.at>
References: <506dd5f4-65fe-4d34-8cfe-2ebc08b978e4@Spark>
	<ZeirvYIUOXpgocLo@tamriel.snowman.net>
	<20240307211655.mqx2pmmyflyb2jlr@hjp.at>

"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





view thread (7+ messages)

Message-ID: <683604.1709859108@sss.pgh.pa.us>
Permalink:  ../683604.1709859108@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/683604.1709859108@sss.pgh.pa.us

 · 

reply

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, hjp-pgsql@hjp.at
  Subject: Re: Thoughts on user-defined types for talk at Postgres conference?
  In-Reply-To: <683604.1709859108@sss.pgh.pa.us>
  References: <506dd5f4-65fe-4d34-8cfe-2ebc08b978e4@Spark> <ZeirvYIUOXpgocLo@tamriel.snowman.net> <20240307211655.mqx2pmmyflyb2jlr@hjp.at> <683604.1709859108@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