Hi. On 2018/05/02 11:05, Michael Paquier wrote: > On Tue, May 01, 2018 at 12:30:44PM -0400, Robert Haas wrote: >> However, backing up a minute, I don't think "relation \"%s\" is not a >> btree index" is such a terrible message. These modules are intended >> to be intended by people who Know What They Are Doing. If we do want >> to change the message, I submit that the only thing that makes it a >> little unclear is that a user might fail to realize that a partitioned >> index is not an index. But that could be fixed just by adding a >> separate message for that one case (index \"%s\" is partitioned) and >> sticking with the existing message for other cases.
+1 > I have been chewing on that, and I come to agree that there is perhaps > little point to complicate the code as long as a failure is properly > reported to the user. I propose hence the attached, which adds test > cases in the contrib module set for partitioned indexes (amcheck also > lacked tests for partition tables and indexes), and fixes a set of code > paths to be consistent with the presence of this new relkind. --- a/contrib/amcheck/expected/check_btree.out +++ b/contrib/amcheck/expected/check_btree.out +-- verify partitioned tables are rejected (error) +SELECT bt_index_check('bttest_partitioned'); +ERROR: "bttest_partitioned" is not an index Perhaps, I'm just repeating what's already been said, but I think it might be better to have the word "partitioned" in the message. ERROR: "bttest_partitioned" is partitioned index ..which Robert seems to think might not be too bad. That will need adding some code to these modules like we did in c08d82f38ebf763 [1]. Thanks, Amit [1] https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=c08d82f38eb