pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alexander Lakhin <exclusion@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-bugs@lists.postgresql.org, Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Subject: Re: BUG #17872: Dropping an attribute of a composite type breaks indexes over the type silently
Date: Mon, 27 Mar 2023 22:00:00 +0300
Message-ID: <67cb509e-93c7-1c7b-2388-d7e00277b344@gmail.com> (raw)
In-Reply-To: <3267914.1679941213@sss.pgh.pa.us>
References: <17872-d0fbb799dc3fd85d@postgresql.org>
	<3169550.1679928579@sss.pgh.pa.us>
	<3182314.1679935605@sss.pgh.pa.us>
	<1aa2eec0-2017-3870-6d88-228d08c587d3@gmail.com>
	<3267914.1679941213@sss.pgh.pa.us>

27.03.2023 21:20, Tom Lane wrote:
> Alexander Lakhin <exclusion@gmail.com> writes:
>> Yes, I think something like that can resolve the issue.
>> But I would also note that the problem is not with indexes only, but also
>> with "... partition by list(comp_type_value)", for example.
> Hmm ... really?  I'd just concluded that a partitioned table is okay
> as long as it doesn't yet have any partitions.  Even if the modified
> type is a partitioning column, there's no structure yet that could
> depend on the contents of the type.  (If it does have partitions,
> we'll fail when we get to one of those.)

The following query leads to a failure on showing a partition definition:
CREATE TABLE tbl(a int, b int) PARTITION BY LIST ((tbl));
CREATE TABLE tblp PARTITION OF tbl FOR VALUES IN ('(2,4)');
ALTER TABLE tbl ALTER COLUMN a TYPE char(5);
\d+ tbl
(The effect depends on the values specified.)
It's not exactly the dependency issue but still is related to altering
a composite type.

Best regards,
Alexander





view thread (9+ messages)  latest in thread

Message-ID: <67cb509e-93c7-1c7b-2388-d7e00277b344@gmail.com>
Permalink:  ../67cb509e-93c7-1c7b-2388-d7e00277b344@gmail.com/
Also on:    postgresql.org/message-id/67cb509e-93c7-1c7b-2388-d7e00277b344@gmail.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: exclusion@gmail.com, tgl@sss.pgh.pa.us, peter.eisentraut@enterprisedb.com
  Subject: Re: BUG #17872: Dropping an attribute of a composite type breaks indexes over the type silently
  In-Reply-To: <67cb509e-93c7-1c7b-2388-d7e00277b344@gmail.com>

* 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