Re: [PATCH] Fix duplicate errmsg in ALTER TABLE SPLIT PARTITION

jian he <jian.universality@gmail.com>

From: jian he <jian.universality@gmail.com>
To: Ayush Tiwari <ayushtiwari.slg01@gmail.com>
Cc: John Naylor <johncnaylorls@gmail.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>, Daniel Gustafsson <daniel@yesql.se>
Date: 2026-04-23T02:57:23Z
Lists: pgsql-hackers
On Wed, Apr 22, 2026 at 7:06 PM Ayush Tiwari
<ayushtiwari.slg01@gmail.com> wrote:
>
> Attaching v3 patch.
>
hi.

V3 looks good to me.
The error message already conveyed the failure reasoning.
Just adding comment `-- ERROR` to partition_merge.sql, partition_split.sql
is enough, I think.

- 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 ... MERGE PARTITIONS requires the partition
bounds to be adjacent."),

The errdetail already explicitly explains the failure reason, removing
the errhint should be fine, I think.
I noticed you removed "the", I'm not sure if that's okay since I am
not a native English speaker.



--
jian
https://www.enterprisedb.com/



Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Rationalize error comments in partition split/merge tests

  2. Message corrections for partition split/merge commands