| From: | Ayush Tiwari <ayushtiwari(dot)slg01(at)gmail(dot)com> |
|---|---|
| To: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Cc: | Daniel Gustafsson <daniel(at)yesql(dot)se> |
| Subject: | [PATCH] Fix duplicate errmsg in ALTER TABLE SPLIT PARTITION |
| Date: | 2026-04-21 04:34:11 |
| Message-ID: | CAJTYsWUvMT5uKOasPnm6-o9CrdXbRONiAYHTKJb7wx66LB8S1A@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
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
| Attachment | Content-Type | Size |
|---|---|---|
| 0001-Fix-duplicate-errmsg-in-ALTER-TABLE-SPLIT-PARTITION.patch | application/octet-stream | 1.4 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Ayush Tiwari | 2026-04-21 05:03:48 | Re: [PATCH] postmaster: fix stale PM_STARTUP comment |
| Previous Message | 반지현 | 2026-04-21 04:25:09 | Re: Return value of XLogInsertRecord() for XLOG_SWITCH record |