Re: ERROR: "ft1" is of the wrong type.

Peter Eisentraut <peter.eisentraut@enterprisedb.com>

From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: Michael Paquier <michael@paquier.xyz>, Ahsan Hadi <ahsan.hadi@gmail.com>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2021-07-08T08:02:53Z
Lists: pgsql-hackers
On 02.07.21 06:20, Michael Paquier wrote:
> On Wed, Jun 30, 2021 at 01:43:52PM +0500, Ahsan Hadi wrote:
>> Sure I will also take a look at this patch.
>>
>> +1 for avoiding the backpatching burden.
> 
>  From what I recall of this thread, nobody has really complained about
> this stuff either, so a backpatch would be off the table.  I agree
> that what Peter E is proposing on the other thread is much more
> suitable in the long term, as there is no need to worry about multiple
> combinations of relkinds in error message, so such error strings
> become a no-brainer when more relkinds are added.

My patch is now committed.  The issue that started this thread now 
behaves like this:

ALTER TABLE ft1 ATTACH PARTITION ...;
ERROR:  ALTER action ATTACH PARTITION cannot be performed on relation "ft1"
DETAIL:  This operation is not supported for foreign tables.

So, for PG15, this is taken care of.

Backpatches under the old style for missing combinations would still be 
in scope, but there my comment on the proposed patches is that I would 
rather not remove apparently unused combinations from back branches.



Commits

  1. Fix unexpected error messages for various flavors of ALTER TABLE

  2. Revert per-index collation version tracking feature.

  3. Restructure ALTER TABLE execution to fix assorted bugs.