| From: | Fujii Masao <masao(dot)fujii(at)gmail(dot)com> |
|---|---|
| To: | Andreas Karlsson <andreas(at)proxel(dot)se> |
| Cc: | Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Prevent setting NO INHERIT on partitioned not-null constraints |
| Date: | 2026-05-22 01:10:46 |
| Message-ID: | CAHGQGwGALH08zGOwSMz_gCf=TzBRJ4C7FQKJzD099tB_WV600g@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Fri, May 22, 2026 at 6:22 AM Andreas Karlsson <andreas(at)proxel(dot)se> wrote:
>
> On 5/21/26 5:01 PM, Jim Jones wrote:
> > The errcode is most likely wrong:
> >
> > ERRCODE_WRONG_OBJECT_TYPE -> ERRCODE_FEATURE_NOT_SUPPORTED
> >
> > At least it is inconsistent with an equivalent check in parse_utilcmd.c:
> >
> > if (cxt->ispartitioned && constraint->is_no_inherit)
> > ereport(ERROR,
> > errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
> > errmsg("not-null constraints on partitioned tables cannot be
> > NO INHERIT"));
>
> Thanks, that was a copy pasto. Version 2 is attached.
Thanks for the patch! It looks good to me.
Barring any objections, I will commit it.
This should be backpatched to v18, where ALTER TABLE ... ALTER
CONSTRAINT ... [NO] INHERIT
was added. Right?
Regards,
--
Fujii Masao
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Chao Li | 2026-05-22 02:06:33 | Re: Fix pg_stat_wal_receiver to show CONNECTING status |
| Previous Message | surya poondla | 2026-05-21 22:09:05 | Re: pg_rewind does not rewind diverging timelines |