pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alexander Lakhin <exclusion@gmail.com>
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 15:06:21 -0400
Message-ID: <3332642.1679943981@sss.pgh.pa.us> (raw)
In-Reply-To: <67cb509e-93c7-1c7b-2388-d7e00277b344@gmail.com>
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>
	<67cb509e-93c7-1c7b-2388-d7e00277b344@gmail.com>

Alexander Lakhin <exclusion@gmail.com> writes:
> 27.03.2023 21:20, Tom Lane wrote:
>> 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);

Sure, but there you already have a partition.  If you only had "tbl"
then there would be no stored partition bounds.

			regards, tom lane





view thread (9+ messages)  latest in thread

Message-ID: <3332642.1679943981@sss.pgh.pa.us>
Permalink:  ../3332642.1679943981@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3332642.1679943981@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 using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, exclusion@gmail.com, peter.eisentraut@enterprisedb.com
  Subject: Re: BUG #17872: Dropping an attribute of a composite type breaks indexes over the type silently
  In-Reply-To: <3332642.1679943981@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