pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Junwang Zhao <zhjwpku@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Thomas Munro <thomas.munro@gmail.com>
Cc: nik@postgres.ai
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18244: Corruption in indexes involving whole-row expressions
Date: Thu, 14 Dec 2023 09:44:33 +0100
Message-ID: <c56c11e52620ea3a51f13aa482ac2376a3c552e8.camel@cybertec.at> (raw)
In-Reply-To: <CAEG8a3JbvhTMN3MyivyOZXhMAMUMWgB-F70cQ+Y2pqi4bje5pg@mail.gmail.com>
References: <18244-8a7897de2acd5a08@postgresql.org>
	<f577abdc489e75a0b62f0648829d633d75ff8d95.camel@cybertec.at>
	<CA+hUKGJPxjaD3d_qYrHPxHLS_=ktVMFK7O-+9RgTBzQUTB9q6A@mail.gmail.com>
	<c37d4184c476a15ad4c488d272bdc95ea7b0ff49.camel@cybertec.at>
	<2528430.1702440277@sss.pgh.pa.us>
	<ce4165ffeac66281faa05cd9fc5ceabebe210af0.camel@cybertec.at>
	<CAEG8a3JbvhTMN3MyivyOZXhMAMUMWgB-F70cQ+Y2pqi4bje5pg@mail.gmail.com>

On Thu, 2023-12-14 at 16:27 +0800, Junwang Zhao wrote:
> +   While you can use composite types in column definitions, there is usually no
> +   benefit in doing so.
> 
> Is this true? If yes, we'd better update this to
> https://wiki.postgresql.org/wiki/Don%27t_Do_This.

I cannot think of a use case for composite type columns that wouldn't be
better served by directly declaring the columns of the composite key
in the table definition.  And it makes accessing the values more complicated.

So yes, I'd be on board with a "don't do this" entry.

Yours,
Laurenz Albe





view thread (8+ messages)

Message-ID: <c56c11e52620ea3a51f13aa482ac2376a3c552e8.camel@cybertec.at>
Permalink:  ../c56c11e52620ea3a51f13aa482ac2376a3c552e8.camel@cybertec.at/
Also on:    postgresql.org/message-id/c56c11e52620ea3a51f13aa482ac2376a3c552e8.camel@cybertec.at

 · 

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-bugs@postgresql.org
  Cc: laurenz.albe@cybertec.at, zhjwpku@gmail.com, tgl@sss.pgh.pa.us, thomas.munro@gmail.com, nik@postgres.ai
  Subject: Re: BUG #18244: Corruption in indexes involving whole-row expressions
  In-Reply-To: <c56c11e52620ea3a51f13aa482ac2376a3c552e8.camel@cybertec.at>
  References: <18244-8a7897de2acd5a08@postgresql.org> <f577abdc489e75a0b62f0648829d633d75ff8d95.camel@cybertec.at> <CA+hUKGJPxjaD3d_qYrHPxHLS_=ktVMFK7O-+9RgTBzQUTB9q6A@mail.gmail.com> <c37d4184c476a15ad4c488d272bdc95ea7b0ff49.camel@cybertec.at> <2528430.1702440277@sss.pgh.pa.us> <ce4165ffeac66281faa05cd9fc5ceabebe210af0.camel@cybertec.at> <CAEG8a3JbvhTMN3MyivyOZXhMAMUMWgB-F70cQ+Y2pqi4bje5pg@mail.gmail.com> <c56c11e52620ea3a51f13aa482ac2376a3c552e8.camel@cybertec.at>

* 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