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 1uCb2R-00HDUB-94 for pgsql-hackers@arkaria.postgresql.org; Wed, 07 May 2025 09:26:03 +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 1uCb2P-00D2Uf-CJ for pgsql-hackers@arkaria.postgresql.org; Wed, 07 May 2025 09:26:01 +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 1uCb2P-00D2UW-1T for pgsql-hackers@lists.postgresql.org; Wed, 07 May 2025 09:26:01 +0000 Received: from fhigh-b4-smtp.messagingengine.com ([202.12.124.155]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uCb2M-000bTI-04 for pgsql-hackers@lists.postgresql.org; Wed, 07 May 2025 09:26:00 +0000 Received: from phl-compute-01.internal (phl-compute-01.phl.internal [10.202.2.41]) by mailfhigh.stl.internal (Postfix) with ESMTP id 731DC25401BA; Wed, 7 May 2025 05:25:56 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-01.internal (MEProxy); Wed, 07 May 2025 05:25:56 -0400 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=1746609956; x= 1746696356; bh=SHYqPZ8cEXuhJRyi3h3ECJPPN9HE5hoUuXyAQcUA37c=; b=Q vvA6NI9zVAR+Z+rW6/ULBBLpPbe10+t5Qqw8VmQ34MAjr/Jq8W5A94S2sAKMQmoZ 2irNBsxzy7/g+oMHukmOeXFk48J4sMkDnnITQdsCZEaa+7cceEDQo2JJe83dM7l4 Mp83vNJ3Mxd4snhtj514kVf7vqGA3DejzYScur+XFnFHgRlqbRrmM7iPmb+tEX3M I05mtGR2IQ0/Fadui2WOHI6I6HzfBHvOz0FA/MZGgQiWKFZn56A0g6H2RpkK2mv9 peQhbZzFO97J+K54kjFuXla47wAaED1WSkrvAUD7xyjuKwcQ1YNyUc6MJiVMh+Di kqXh9oPA0i4ko57iRKy3A== 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=1746609956; x=1746696356; bh=S HYqPZ8cEXuhJRyi3h3ECJPPN9HE5hoUuXyAQcUA37c=; b=KXSCNu1ZwT1s/WmfD tg+eCKr+2cDus67fl4H7/GtAWYGpgZjBXmsucgO9fCNIfU1xyaQCsKU68PVzb+CQ axxmaCGFv8Tpc5GEQc15WisMM0c0FeKfVPrJLSpajXi6U1I/VoH7kll+B+TO7tpy PSJkziY0ixeNjbLOBRjZgs+3nVIzoedOwt3jZuupiQ/lW0Zw1bcptX7cDpKhCj8G qhVkw/ohPOSvbWEvsYGyTT3aMqJETstKCBtHa91Ol5oXvu73PtWp33vAb+Zigtc9 ZKbtO8Kb/o4ms4lGpYs4I59QcB3+D8OeCSBdMX9scQFvNVUWGLlKs3++GguWzV94 dFfWw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvkeeigeelucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhepfffhvfevuffkgggtugfgjgesthekredttddt jeenucfhrhhomheplmhlvhgrrhhoucfjvghrrhgvrhgruceorghlvhhhvghrrhgvsehkuh hrihhlvghmuhdruggvqeenucggtffrrghtthgvrhhnpeetuedvheffkeevgfeuheevteev kefggedttdeufeeuheduuddthfeffffhjeefffenucffohhmrghinhepvghnthgvrhhprh hishgvuggsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghi lhhfrhhomheprghlvhhhvghrrhgvsehkuhhrihhlvghmuhdruggvpdhnsggprhgtphhtth hopedvpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehjihgrnhdruhhnihhvvghr shgrlhhithihsehgmhgrihhlrdgtohhmpdhrtghpthhtohepphhgshhqlhdqhhgrtghkvg hrsheslhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhg X-ME-Proxy: Feedback-ID: ie3de48e3:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 7 May 2025 05:25:55 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kurilemu.de; s=schmee; t=1746609953; bh=FNDDQukOuHqzLx2vFgqqoc8sTq68YJXrjdkO1p56r/s=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=G9AygB++GfEsDw92kGxkbqRbUWQQMzw2BMtskHEzX5l8OTz6944aMJaHftMeZHSO6 DFWVUXWaSPsix4xImfoHYByIHKMlvp5yiCfG1kJ1cUhnO4NI3Z6sZGewmUtPEk3rpO ZB4WkZETiz8p+M3WzQGvV87ETb9gdcDm9skXlio2iDjEe1Y691/df7+4YzFortk5Pp DdXLihv2xK/HIVcTw1SPwhiaML6+K5DMuiMva/RKnINDfrOuwIGEYsIjuUrJiaxDjh YjEOPEba2A0cQovsgV4x3Bh8dwc2LgnaH09j8cPNOVkP+O2lqJ+VGemZBZIJofIvN0 vhgh7J1LCHveA== Received: by schmee.alvh.no-ip.org (Postfix, from userid 1000) id 4D04F90; Wed, 7 May 2025 11:25:53 +0200 (CEST) Date: Wed, 7 May 2025 11:25:53 +0200 From: =?utf-8?Q?=C3=81lvaro?= Herrera To: jian he Cc: PostgreSQL Hackers Subject: Re: pg_dump does not dump domain not-null constraint's comments Message-ID: <202505070925.4wymawhqsuvm@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 2025-May-07, jian he wrote: > in PG17 and master, pg_dump (--schema=test --no-owner) > [...] > didn't produce > COMMENT ON CONSTRAINT nn ON DOMAIN test.d1 IS 'not null constraint on > domain d1'; > we should make pg_dump to produce it too? Yes, this is clearly a pg17 bug whose fix should be backpatched. > The attached patch tries to make it produce comments on not-null > constraints on domains. Thanks, I'll have a look. > I aslo renamed struct TypeInfo fields, nDomChecks will be renamed to > nDomConstrs; domChecks will be renamed to domConstrs. > TypeInfo->domConstrs will also include not-null constraint > information, changing from domChecks to domConstrs makes sense, IMHO. Hmm, for a backpatch I would leave the field names alone since they are publicly visible; we can rename separately in pg19 once it opens. Can you resubmit splitting the renaming out to a 0002 patch? -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "In fact, the basic problem with Perl 5's subroutines is that they're not crufty enough, so the cruft leaks out into user-defined code instead, by the Conservation of Cruft Principle." (Larry Wall, Apocalypse 6)