On Thu, Apr 23, 2026 at 3:23 PM Ayush Tiwari
<ayushtiwari.slg01@gmail.com> wrote:
> On Thu, 23 Apr 2026 at 12:24, John Naylor <johncnaylorls@gmail.com> wrote:
> Attaching separate patches one with edits, and the other for ERRORs.
> Please review and let me know.
> [v4]
Thanks for that. One correction got lost from from the v3 message edits:
errmsg("can not {split/merge} to partition \"%s\" together with
partition \"%s\"",
errdetail("lower bound of partition \"%s\" is not equal to the upper
bound of partition \"%s\"",
Note that this should also change the .sql test comment. That
emphasizes the need for the follow-on 0002 patch.
Also, I mentioned earlier that I didn't like how these two messages
are only different by word, but the "split" case sounds awkward this
way. Also, I didn't really like the fact that one errmsg refers to the
old partitions, and one refers to the new. My suggestion was:
>> errmsg("cannot split partition \"%s\"",
>> get_rel_name(splitPartOid)),
>>
>> ...that way the errmsg's mention the old partition(s), whether the
>> action is splitting or merging.
Another thing that got lost, although less important:
>> - errdetail("lower bound of partition \"%s\" is not equal to the
>> upper bound of partition \"%s\"",
>> + errdetail("Lower bound of partition \"%s\" is not equal to upper
>> bound of partition \"%s\".",
>> second_name->relname, first_name->relname),
>> - errhint("ALTER TABLE ... SPLIT PARTITION requires the partition
>> bounds to be adjacent."),
>> parser_errposition(pstate, datum->location));
>>
>> Ditto here: Two articles for the errdetail, and the errhint is not a
>> problem. Although, perhaps it'd be better if the two errhints said
>> "old/new partition bounds", respectively, for clarity.
By "two articles", I meant "The lower bound of ... to the upper bound
of ...". That's just a suggestion, and not quite a correction like the
others, but wanted to bring it up while we're changing the text
anyway.
If it were just something like "Lower bound is not a valid foo", then
I don't think I'd bother changing it, but with two things, I think it
sounds better with two "the"s.
--
John Naylor
Amazon Web Services