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 1t96ii-007nsD-Vv for pgsql-hackers@arkaria.postgresql.org; Thu, 07 Nov 2024 17:55:00 +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 1t96ig-000UlV-Cy for pgsql-hackers@arkaria.postgresql.org; Thu, 07 Nov 2024 17:54:58 +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 1t96if-000UlM-NX for pgsql-hackers@lists.postgresql.org; Thu, 07 Nov 2024 17:54:58 +0000 Received: from fhigh-b1-smtp.messagingengine.com ([202.12.124.152]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t96iX-000iHX-IW for pgsql-hackers@lists.postgresql.org; Thu, 07 Nov 2024 17:54:57 +0000 Received: from phl-compute-04.internal (phl-compute-04.phl.internal [10.202.2.44]) by mailfhigh.stl.internal (Postfix) with ESMTP id 2834E254008A; Thu, 7 Nov 2024 12:54:48 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-04.internal (MEProxy); Thu, 07 Nov 2024 12:54:48 -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=1731002088; x=1731088488; bh=w BEc+6cqBKRRakeP6ag1RKgVQR2swQkrYqLBeTzEoSM=; b=ile4lKdmEXeGPDT2W jnV9bms9ne/W9CwkiN+/CJIbZwTlK3atw/k/IcRleiDY0JZ/IO6ctbTKYWFNyUUE xIfg8F1eXY+ur1DmZi6F5dmj9HaXjqJubafHc2kPX7KrSg1I3hmvWDDcrjshHlcN gC9G1p3oHk8rGJtD4fB38++XVXLX6zn8ztNfYfy/68zb0DmSoy7Lp0cX9Rq5d8sQ Sp2oeZsdFXqudC+2YIBplYAitC4VqwpMm8vHn/yXKd157VVuQg8swr531UgbYIx3 5Cvf9vEAc6yQN72QkYyx1oEZC6h33GL/D6cxTGUXVsQL5qHTwdWZ2Vb0jsubyqC6 1RnLQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrtdeggddutdehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepfffhvfevuffkgggtugfgjgesthekredttddtjeen ucfhrhhomheptehlvhgrrhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsegrlhhvhh drnhhoqdhiphdrohhrgheqnecuggftrfgrthhtvghrnhepvdektdffudfftdffffehfffh jeejhffgieeuueekjeekfffgudffhfduffffueevnecuffhomhgrihhnpegvnhhtvghrph hrihhsvggusgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgr ihhlfhhrohhmpegrlhhvhhgvrhhrvgesrghlvhhhrdhnohdqihhprdhorhhgpdhnsggprh gtphhtthhopeefpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegrmhhithhlrghn ghhothgvtdelsehgmhgrihhlrdgtohhmpdhrtghpthhtoheprhhosggvrhhtmhhhrggrsh esghhmrghilhdrtghomhdprhgtphhtthhopehpghhsqhhlqdhhrggtkhgvrhhssehlihhs thhsrdhpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: ia2694551:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 7 Nov 2024 12:54:47 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alvh.no-ip.org; s=schmee; t=1731002084; bh=aRP8uuagJMCGqZHJn+EJWUNl6PYvApQNx39EJwp76LE=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=AXQGoI4ZRXyeboi0D4gtD1DjmZhsBaE5S/wBFR+VZAsaYE9xPINKdB+VNjwDYYdAp l2Urqc6M3wwlaivtkJFznh8g/K1zg3r0Kc9Rhku8Ew+6s0VZ01OqAhvtBKyIhbyou2 Z2Xef08AZIdKw0LFNwc0IKqBJjHk8sWDdJupeqW3MceZU+G3bDAsaWilwgeXjuM3SK Cls95rfQmRs9oPpGH1B9QvLPoPWjLzB1DQDpZ0FlL59Dcf7F7t6KNk2Z+eFPeNpiGn lbGk2tyWyEcD56XREvE3JJ1cZx711gETLcl7EJxgCruRPexk6b2yyxrHWu+HZZUFQW GM/R3ex3S6QKg== Received: by schmee.alvh.no-ip.org (Postfix, from userid 1000) id C877E9B; Thu, 7 Nov 2024 18:54:44 +0100 (CET) Date: Thu, 7 Nov 2024 18:54:44 +0100 From: Alvaro Herrera To: Amit Langote Cc: Pg Hackers , Robert Haas Subject: Re: doc fail about ALTER TABLE ATTACH re. NO INHERIT Message-ID: <202411071754.h3yfmp6vmgjn@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 On 2024-Nov-07, Amit Langote wrote: > On Wed, Nov 6, 2024 at 9:34 PM Alvaro Herrera wrote: > > Oh, hmm, that makes sense I guess. Still, while this restriction makes > > sense for inheritance, it doesn't IMO for partitioned tables. I would > > even suggest that we drop enforcement of this restriction during ATTACH. > > I agree. Since leaf partitions have no children to propagate > constraints to, the NO INHERIT mark shouldn't matter. And partitioned > partitions already disallow NO INHERIT constraints as you mentioned. > > Do you think we should apply something like the attached at least in > the master? I found that a similar restriction exists in the CREATE > TABLE PARTITION OF path too. Yeah, that sounds reasonable. I didn't look at the code in detail, but I'm not sure I understand why you'd change CREATE TABLE PARTITION OF, since the point is that this restriction would apply when you attach a table that already exists, not when you create a new table. Maybe I misunderstand what you're saying though. > +1 Thanks, pushed. > Though if we decide to apply the attached, does the note "not marked > NO INHERIT" become unnecessary? Yes -- I think your patch would have to remove it again. A short-lived note for sure, but I thought it was better to have all branches in the same state, and now you can modify master. -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/