| From: | Yuchen Li <liyuchen_xyz(at)163(dot)com> |
|---|---|
| To: | Ayush Tiwari <ayushtiwari(dot)slg01(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Cc: | Daniel Gustafsson <daniel(at)yesql(dot)se> |
| Subject: | Re: [PATCH] Fix duplicate errmsg in ALTER TABLE SPLIT PARTITION |
| Date: | 2026-04-21 05:40:41 |
| Message-ID: | eb61a893-add2-4b59-9311-c645e79038b5@163.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On 4/21/2026 12:34 PM, Ayush Tiwari wrote:
> Hi hackers,
>
> The ereport() in transformPartitionCmdForSplit() that fires when
> splitting a non-default partition while a default partition already
> exists has two errmsg() calls:
>
> ereport(ERROR,
> errcode(ERRCODE_INVALID_OBJECT_DEFINITION),
> errmsg("can not split non-DEFAULT partition \"%s\"", ...),
> errmsg("new partition cannot be DEFAULT because ..."),
> parser_errposition(...));
>
> The second one should had been errdetail()
>
> The attached patch changes the second errmsg() to errdetail().
>
> Also, I think "can not" can be replaced with "cannot" for consistency
> throughout? Havent added is as part of this patch though. Thoughts?
>
> Regards,
> Ayush
Good catch. I agree the second one should be a detail. The first letter
has been capitalized, and a period is added. So, the patch looks good to me.
Regards,
Yuchen Li
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Evgeny Voropaev | 2026-04-21 05:41:25 | Re: Compress prune/freeze records with Delta Frame of Reference algorithm |
| Previous Message | 南拓弥 | 2026-04-21 05:35:35 | Warn on missing replica identity in CREATE/ALTER PUBLICATION |