public inbox for pgsql-hackers@postgresql.org
help / color / mirror / Atom feedFrom: Fujii Masao <masao.fujii@gmail.com>
To: Andreas Karlsson <andreas@proxel.se>
Cc: Jim Jones <jim.jones@uni-muenster.de>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Prevent setting NO INHERIT on partitioned not-null constraints
Date: Fri, 22 May 2026 10:10:46 +0900
Message-ID: <CAHGQGwGALH08zGOwSMz_gCf=TzBRJ4C7FQKJzD099tB_WV600g@mail.gmail.com> (raw)
In-Reply-To: <7299e1c3-9cf5-4e72-94ae-1771d88fb0a3@proxel.se>
References: <ecc985ad-6ec1-4094-a315-317943ca5f3f@proxel.se>
<24bfd6b7-d566-490c-812f-c61c9eb2ef69@uni-muenster.de>
<7299e1c3-9cf5-4e72-94ae-1771d88fb0a3@proxel.se>
On Fri, May 22, 2026 at 6:22 AM Andreas Karlsson <andreas@proxel.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
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: masao.fujii@gmail.com, andreas@proxel.se, jim.jones@uni-muenster.de, pgsql-hackers@lists.postgresql.org
Subject: Re: Prevent setting NO INHERIT on partitioned not-null constraints
In-Reply-To: <CAHGQGwGALH08zGOwSMz_gCf=TzBRJ4C7FQKJzD099tB_WV600g@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox