Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vkNf1-00EESc-2X for pgsql-bugs@arkaria.postgresql.org; Mon, 26 Jan 2026 14:33:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vkNf0-008J8b-28 for pgsql-bugs@arkaria.postgresql.org; Mon, 26 Jan 2026 14:33:46 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vkNez-008J8T-2w for pgsql-bugs@lists.postgresql.org; Mon, 26 Jan 2026 14:33:46 +0000 Received: from fhigh-a8-smtp.messagingengine.com ([103.168.172.159]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1vkNew-00000000YPT-3LC5 for pgsql-bugs@lists.postgresql.org; Mon, 26 Jan 2026 14:33:45 +0000 Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfhigh.phl.internal (Postfix) with ESMTP id BA74114002FD; Mon, 26 Jan 2026 09:33:40 -0500 (EST) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-05.internal (MEProxy); Mon, 26 Jan 2026 09:33:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kurilemu.de; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to; s=fm1; t=1769438020; x= 1769524420; bh=YcSyI4/tVewGxzhKwq0+nMiCdewJLFQ4zEzDU559CBo=; b=S rkSSZz7p6DrGG7l+BqJUGkhKZeG6MX7OIGUNbA5Z5TQaBfdZIvsaAMn6dG3gdr4H tQbgEXb0xBBtvU4f3zCbUyzLs8NZLuXi/AUaHz/jmlZrpBiROWa9g3c3bSs+iefv Aso6D77yeBtfPxpefDFjbsajVvp4E+Iplom+X6MVg6EitaAhiUaTZ9ifry+ni9iD rdk5NsLpriZmXo+VR4xfitrKBpbFvacrHV4hmsj3T30PA0wK/StrcWF+HfUI+pts 7YysjCHa5WSDrHwyzOf4imXpqNHzlC95TI25nTJXIdSYZYoCRXsMzLdG/kqfKTYO OnaDWax152C/ef6dzldqg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; t=1769438020; x=1769524420; bh=Y cSyI4/tVewGxzhKwq0+nMiCdewJLFQ4zEzDU559CBo=; b=KtxRqQqv0gW7+RY8Q tGT7DeVhNYECdM7UQa1QVwyZWTdfZluisyaYR4P189PWygY+xLA8ICbfwqXj56mc 7e8AjjanE7JjmHdczId7TqhedZ9XEKs3Msbz1nfk5PAPNaMPKgHTasVPOgWyGezL fsDnSC0wh7GVmZa+2trGqmJKJ3io1iRn6QxI7xiL3uKGv6ZniKHEPd/4H1wCZAwQ UzY1Dtw9vRl4LjyL34tzrOVXkuibC/KYi52y7DEfpzoqxptJcBfFCJRT4ZvHT9Ik 2cJtRJmiRQW5K5LI4ZNM2fmzvspWItsjMB74Xe4QWdGbzQU2rYNDk2FETE9jjfzE axhIg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdduheejledvucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepfffhvfevuffkgggtugfgjgesthekredttddtjeenucfhrhhomheplmhlvhgrrhho ucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsehkuhhrihhlvghmuhdruggvqeenucggtf frrghtthgvrhhnpeetuedvheffkeevgfeuheevteevkefggedttdeufeeuheduuddthfef fffhjeefffenucffohhmrghinhepvghnthgvrhhprhhishgvuggsrdgtohhmnecuvehluh hsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghlvhhhvghrrhgv sehkuhhrihhlvghmuhdruggvpdhnsggprhgtphhtthhopeefpdhmohguvgepshhmthhpoh huthdprhgtphhtthhopehmshgunhgthhhinhgrseduieefrdgtohhmpdhrtghpthhtohep shhrihhnrghthhdvudeffeesghhmrghilhdrtghomhdprhgtphhtthhopehpghhsqhhlqd gsuhhgsheslhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: ie3de48e3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 26 Jan 2026 09:33:40 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kurilemu.de; s=schmee; t=1769438017; bh=K7HVTYGGf2FkE5ULp3rxuYpVVxYr41qdgZCy4GFkhv4=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=Jzsm5FzXG812eRQJrnqhDUyZF3yTmzgTzcnp+eHc8V6dEAz9W7DX++flSKizgbz3c 5sy7yHTl/C9KIT3eavA0e/4we7OzLQFkq6nXYNVYSczhkeLgk+NdpGHTU5t+Zreh/M 7ObTjnRTcCCpYQeTHgsOW+OB/cwEYFU0Tqwd2d+5GEZ6GvAvI83vtLUpsR7Y11/dha ZAzjxeakbyrUaVyf2tKWmjeS0g8/qu5ZBCBztmLk/dIT9GFyuBb06fGzqK1crvBNDW SMchSkr8L+QkOO+yy5bb/8te8ir4R3J9dLJwRpksknT7WhugeeCqpYu/3nSQ4x3QOk 7+slJQ1WIPMxA== Received: by schmee.kurilemu.internal (Postfix, from userid 1000) id 47BC67A; Mon, 26 Jan 2026 15:33:37 +0100 (CET) Date: Mon, 26 Jan 2026 15:33:37 +0100 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: Srinath Reddy Sadipiralla Cc: yanliang lei , pgsql-bugs@lists.postgresql.org Subject: Re: Re: Re: BUG #19351: in pg18.1,when not null exists in the table , and add constraint problem. Message-ID: <202601261426.hr65rf3efvr3@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello, On 2026-Jan-26, Srinath Reddy Sadipiralla wrote: > i looked into this, Thank you! > the reason for these failures was when the given name for a constraint > for a parent table propagates to the child table because of > inheritance the name conflicts and throws "mismatching constraint > name" error we added, Right, that's what I saw. > I think we can fix this by throwing an error only if this constraint > was added directly to the table and not through > inheritance/propagation from the parent, we can do this using the > "is_local" flag, i have checked and all tests passed. Hmm, I'm not opposed to this; does it change any other behavior? I think it's important to see whether there are other corner cases that would react to this behavior change. For example, what would happen if two existing parents have a not-null constraint on the same column? Is there a change for combined LIKE and regular inheritance? I think we should have reasonable reactions to each of those scenarios: create table parent (a int not null); create table parent2 (a int not null); create table child1 () inherits (parent, parent2); create table child2 () inherits (parent2, parent); create table child3 (not null a) inherits (parent2, parent); create table child4 (like parent) inherits (parent2); -- and so on as your imagination allows Would you be able to send a patch based on this idea and what I sent earlier? -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ "Las navajas y los monos deben estar siempre distantes" (Germán Poo)