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

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Cc: peter(dot)eisentraut(at)enterprisedb(dot)com, ahsan(dot)hadi(at)gmail(dot)com, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: ERROR: "ft1" is of the wrong type.
Date: 2021-07-14 10:55:18
Message-ID: YO7ClmoiK0zTeNBI@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jul 09, 2021 at 09:00:31PM +0900, Kyotaro Horiguchi wrote:
> Mmm. Ok, I distributed the mother regression test into each version.

Thanks, my apologies for the late reply. It took me some time to
analyze the whole.

> PG11, 12:
>
> - ATT_TABLE | ATT_PARTITIONED_INDEX
>
> This test doesn't detect the "is of the wrong type" issue.
>
> The item is practically a dead one since the combination is caught
> by transformPartitionCmd before visiting ATPrepCmd, which emits a
> bit different error message for the test.

Yes, I was surprised to see this test choke in the utility parsing.
There is a good argument in keeping (ATT_TABLE |
ATT_PARTITIONED_INDEX) though. I analyzed the code and I agree that
it cannot be directly reached, but a future code change on those
branches may expose that. And it does not really cost in keeping it
either.

> PG13:
> Of course this works fine but doesn't seem clean, but it is
> apparently a matter of the master branch.
>
> - ATT_TABLE | ATT_MATVIEW | ATT_INDEX | ATT_PARTITIONED_INDEX | ATT_FOREIGN_TABLE
> Added and works as expected.

HEAD had its own improvements, and what you have here closes some
holes of their own, so applied. Thanks!
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dilip Kumar 2021-07-14 11:00:30 Re: row filtering for logical replication
Previous Message vignesh C 2021-07-14 10:37:21 Re: Added schema level support for publication.