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 1vNpwT-00GWmb-1u for pgsql-hackers@arkaria.postgresql.org; Tue, 25 Nov 2025 10:06:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vNpwS-007fqw-0G for pgsql-hackers@arkaria.postgresql.org; Tue, 25 Nov 2025 10:06:36 +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 1vNpwR-007fqc-0t for pgsql-hackers@lists.postgresql.org; Tue, 25 Nov 2025 10:06:36 +0000 Received: from fout-b6-smtp.messagingengine.com ([202.12.124.149]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vNpwO-001On2-28 for pgsql-hackers@lists.postgresql.org; Tue, 25 Nov 2025 10:06:35 +0000 Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfout.stl.internal (Postfix) with ESMTP id 9765B1D00233; Tue, 25 Nov 2025 05:06:29 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Tue, 25 Nov 2025 05:06:29 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1764065189; x=1764151589; bh=BMm01BLf3T BuM7L1mUTzcpkMOq/zg5kpB304Mj0ZLaM=; b=qYkXRFAIZR3xp6C5s+gSYS+xlb /BaZ/iYOibuAT0qJUOhnu6evT/o+AQJqYaJ9Yv7dZTFEC8AIXlRiARZ2zvJHTD3I hSfIKsDzISjPaS6ps+tdEJh3X9xC1bcUrliAlcvRxZzoKsJgISZHkHLRsSl3z1Yi VrhPp8tJ49vRq9Y+iFTGrG56AULH3fZFmtlmYm/TzNy6B3wC8ZWfDJD2Gx9Dws60 nAqZvthdvKAu0WIa+Rpl05c9xh2BY+ODdYNV41chRy9M51jXrFWcuYNgR7PUrMjc 3LD7FTlliNAKId2Q4ZgzI/g5kpWpuBXdErCtYvAn0MiKxPVBxYhj5Elnns0Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1764065189; x=1764151589; bh=BMm01BLf3TBuM7L1mUTzcpkMOq/zg5kpB30 4Mj0ZLaM=; b=q8u2ERAiibf7oOisxFcovHXquvBbb1TDpj5/27xpMPNmCT5y8aZ 2SxwBF7yQhgW/8Emm40UqsnTlDX8VczM5lQwBUNCedSm1nIwdZ7tPSNkl5U+rhK5 0mmozdwDN0tSSE6N4xlaKz1D5NPih8zPG149/By1lrRy4DPwLCISaW9odcM+CU+u 8qbH+xe9MtVldJEiYakMPEA67WuVABB6EvirJWv2eiHR+OZ3CS78MZkj/TkQvBOr 0Ga8w69fKhASoGFkRlaSsYmSBCSdjUzX/63vjS7+RrVAOXGGpivt9km6vLNtRNvm Pej+E3TlLRCyQs5DsNEfT635Hk3IDKaoidQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggddvgeduudelucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrh hlucfvnfffucdlfeehmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredttdej necuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesphgrqh huihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepjeeigeehveejvdegkedtgeevjeeu geehleejgeegffdvhfejfeffiefgjeejvdefnecuffhomhgrihhnpehpohhsthhgrhgvsh hqlhdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhr ohhmpehmihgthhgrvghlsehprghquhhivghrrdighiiipdhnsggprhgtphhtthhopeeipd hmohguvgepshhmthhpohhuthdprhgtphhtthhopehlihdrvghvrghnrdgthhgrohesghhm rghilhdrtghomhdprhgtphhtthhopegtohhrvgihrdhhuhhinhhkvghrsehgmhgrihhlrd gtohhmpdhrtghpthhtohepjhhirghnrdhunhhivhgvrhhsrghlihhthiesghhmrghilhdr tghomhdprhgtphhtthhopehtohhmrghssehvohhnughrrgdrmhgvpdhrtghpthhtohepph hgshhqlhdqhhgrtghkvghrsheslhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhgpdhr tghpthhtohepthhglhesshhsshdrphhghhdrphgrrdhush X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 25 Nov 2025 05:06:26 -0500 (EST) Date: Tue, 25 Nov 2025 19:06:09 +0900 From: Michael Paquier To: Chao Li Cc: Corey Huinker , jian he , Tomas Vondra , pgsql-hackers@lists.postgresql.org, tgl@sss.pgh.pa.us Subject: Re: Extended Statistics set/restore/clear functions. Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="CO/qdnVhXxD3Mb9z" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --CO/qdnVhXxD3Mb9z Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Nov 25, 2025 at 04:59:28PM +0800, Chao Li wrote: > I don=E2=80=99t see any of my comments are addressed in v18. Sorry about that, I thought that v17 was addressing these. I have reviewed your latest email posted here: https://www.postgresql.org/message-id/2C8A20C7-4E08-41F4-B30E-AD9F8B007AE5@= gmail.com And well, this presents a bunch of issues I have already fixed (break after return, one error message incorrect, some descriptions). The comments on top of the functions are actually true as they stand (aka ndistinct_array_end() fails if we don't have an array). There is no need to reset state vars upon a JSON_SEM_ACTION_FAILED AFAIK. Finally, the consts are non-appealing for me for functions that are internally used in these files. And forgot one: valid_subsequent_attnum()'s duplication is actually adapted IMO, the argument lists could have different assumptions depending on the type of extended stats we are dealing with. I did not check the comments for 0003~0005. Perhaps you are right that these need adjustments. Thanks, -- Michael --CO/qdnVhXxD3Mb9z Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmklf5EACgkQnvQgOdby QH3tpQ/9HFcZQ02drofY6JiwPROFmf9vfCZesYo6x3SmbKbS92do+3coufLECJxC oeTB6jw9JasEFbGWD/y/EcOmLJAMyc030Tv6tZDp88gJ6cZ5sZsWWj5U8N81l5ZP FVfsNpFl83aERsRxhrxE6vMaldjIuIPK5X/7f9+UwS7FVa4Wt1ci/ThyOpvXiwTD boHRTBBWrHgIiclWPl44eakcHHm7yb8frDk/V8EyoLhondLgyfqwzdGY4jLDUnMp vjvumRm6MTeU2sSNqEemEwqMVpMUhayNaPTtk1FKQk+NiNNCF8lSomYXmlGMEIne 6DyzxaAHbYM3ZzKYspzGRFujMwqHbDIauGk+m4wN41twnP7spyQBcPi6gWMOy7h8 kUXcuOenGZnSdFX0qIQLnwPPNAvFeCYRkcujIOiRa6yuPcu8cUgea2fLFLd8VZ5F pqu/69JISD4JFbztM5dhzLY4IYamAwz4lrMvw0OZya+ONnZNZf+vUTpPaYfms/oQ v5SQkBmFOlBwuC6PMLQktWPp6HugwmGRTROWe9RbS8KbHOn4UyBgDsmKiJGB/Nof SwLHBElqofdETehq/k5LrA6KalYOuD31anrDFN01BlTZDOlgJz8A4+DLkDbc7ntB 3LMQKI1d9AkIEMgXqylMKU74CfoCJM/C4rS7g863oJiiv2zvAsc= =FWm0 -----END PGP SIGNATURE----- --CO/qdnVhXxD3Mb9z--