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.94.2) (envelope-from ) id 1tgMJV-009xrL-IF for pgsql-hackers@arkaria.postgresql.org; Fri, 07 Feb 2025 11:14:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tgMJU-000b0M-KR for pgsql-hackers@arkaria.postgresql.org; Fri, 07 Feb 2025 11:14:24 +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.94.2) (envelope-from ) id 1tgMJT-000b0D-Qn for pgsql-hackers@lists.postgresql.org; Fri, 07 Feb 2025 11:14:24 +0000 Received: from fout-b2-smtp.messagingengine.com ([202.12.124.145]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tgMJQ-004M5H-0z for pgsql-hackers@postgresql.org; Fri, 07 Feb 2025 11:14:23 +0000 Received: from phl-compute-09.internal (phl-compute-09.phl.internal [10.202.2.49]) by mailfout.stl.internal (Postfix) with ESMTP id 1F63D114019D; Fri, 7 Feb 2025 06:14:18 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-09.internal (MEProxy); Fri, 07 Feb 2025 06:14:18 -0500 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=fm3; t=1738926857; x=1739013257; bh=y njJcAOA/eL/lVEE4Gw50VDQVoG6T4uBuDUJ06UraME=; b=rHR50FdeJYvzmhu7e fVROeeKonuHr+eE/iOjhMLfZ1s7YJZy0whuZvSX3eyzhwpfTtLc7PMctKJ1LSjP8 95WjJKcwQt6QY/HQO0yu+iaN2S2L66apmoWTKYniWr/qsjBkuQ6AHatQLB3GnntO qvhJ1zingzzzjnKhSpY1l5dLQk+HCHp3FC0gosb41nAN+XPh/Uu0n8rg7675cted iJlGpcPw/Qz4db9UK5PeGbm8UxnBq7YwyTMDo77bPk8KOfldD6w9pjJ+5dHPVtgm M2QQfynfsmxPm8rtwDjaxPrm4SRBWBe3wrMK2J0CZFtIWxIA83IQsSs60uDW/zU5 VdRcg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvledugecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpeffhffvvefukfggtggugfgjsehtkeertddttdej necuhfhrohhmpeetlhhvrghrohcujfgvrhhrvghrrgcuoegrlhhvhhgvrhhrvgesrghlvh hhrdhnohdqihhprdhorhhgqeenucggtffrrghtthgvrhhnpedvkedtffduffdtffffheff hfejjefhgfeiueeukeejkeffgfdufffhudffffeuveenucffohhmrghinhepvghnthgvrh hprhhishgvuggsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehm rghilhhfrhhomheprghlvhhhvghrrhgvsegrlhhvhhdrnhhoqdhiphdrohhrghdpnhgspg hrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtoheprhhushhhrggs hhdrlhgrthhhihgrsehgmhgrihhlrdgtohhmpdhrtghpthhtohepphhgshhqlhdqhhgrtg hkvghrshesphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 7 Feb 2025 06:14:17 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1738926855; bh=XRtcvOQZiYhiDPrXPKXL4hYvNr/dOUbAE32v6vh9FJ4=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=UIApynk1TQCeu3TsXb38Vl/MYl2RO9UteQE8hVfw0Afyn+tc3pzL/K1WqIJzQuP2D J+n8yW8UsXzVA3vC1dVwEohAKXwDFk7cZwVtVaqld4dP369MyOPt2RdOFVyH7QOnX2 C+bPEh690YsUWxsCscxfN/WVBbxo0gZFE8oerrYRv1FI4nbKVQz3YAzrGAxdwV9fpS xPMCXxJfIbc7TRwTSUyFRs79WhcIwp1nUSMucyssY8QpOWXw6+CFkJuPMCaSdTuR6l N3JvY7EmQkvlvfxhaCQRZlNJT4B5k5NhChCObcZUh9eSxgYjeDbBHybS+BYX2km7J+ 5Nk4jKWmqKYfg== Received: by schmee.alvh.no-ip.org (Postfix, from userid 1000) id B689A95; Fri, 7 Feb 2025 12:14:15 +0100 (CET) Date: Fri, 7 Feb 2025 12:14:15 +0100 From: Alvaro Herrera To: Rushabh Lathia Cc: PostgreSQL Hackers Subject: Re: Support NOT VALID / VALIDATE constraint options for named NOT NULL constraints Message-ID: <202502071114.kosxwvgyblj7@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 Recursion to child tables is incorrectly trying to locate the constraint by name: create table notnull_tbl1 (a int); alter table notnull_tbl1 add constraint foo not null a not valid; create table notnull_chld (a int); alter table notnull_chld add constraint blah not null a not valid; alter table notnull_chld inherit notnull_tbl1 ; -- this fails but shouldn't: alter table notnull_tbl1 validate constraint foo; ERROR: constraint "foo" of relation "notnull_chld" does not exist The end result here should be that the constraint `blah` in table notnull_chld is marked as validated. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ Syntax error: function hell() needs an argument. Please choose what hell you want to involve.