| From: | Tender Wang <tndrwang(at)gmail(dot)com> |
|---|---|
| To: | Alexander Korotkov <aekorotkov(at)gmail(dot)com> |
| Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Add SPLIT PARTITION/MERGE PARTITIONS commands |
| Date: | 2025-12-20 03:18:16 |
| Message-ID: | CAHewXNmBM+5qbrJMu60NxPn+0y-=2wXM-QVVs3xRp8NxFvDb9A@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi Alexander,
I found this feature merged; thanks for this work.
I tested it and found that one place in the error errcode may need to be
changed.
In checkPartition():
...
if (get_partition_parent(partRelOid, false) != RelationGetRelid(rel))
ereport(ERROR,
errcode(ERRCODE_UNDEFINED_TABLE),
errmsg("relation \"%s\" is not a partition of relation \"%s\"",
...
ERRCODE_UNDEFINED_TABLE usually means "table does not exist."
When entering here, the table should exist, otherwise table_open() already
reports an error.
I found another two errcode in checkPartition()
use ERRCODE_WRONG_OBJECT_TYPE,
In the attached patch, I replace ERRCODE_UNDEFINED_TABLE with
ERRCODE_WRONG_OBJECT_TYPE.
--
Thanks,
Tender Wang
| Attachment | Content-Type | Size |
|---|---|---|
| 0001-Adjust-errcode-in-checkPartition.patch | application/octet-stream | 987 bytes |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Xuneng Zhou | 2025-12-20 03:42:29 | Re: RFC: adding pytest as a supported test framework |
| Previous Message | John Naylor | 2025-12-20 02:37:14 | Re: Fix typo 586/686 in atomics/arch-x86.h |