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.98.2) (envelope-from ) id 1xJQ3c-000000009rJ-0v4w for pgsql-bugs@arkaria.postgresql.org; Wed, 21 Oct 2026 06:44:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1xJQ3b-00000004FiR-1RjL for pgsql-bugs@arkaria.postgresql.org; Wed, 21 Oct 2026 06:44:15 +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.98.2) (envelope-from ) id 1xJQ2U-00000004Ax4-06Zj for pgsql-bugs@lists.postgresql.org; Wed, 21 Oct 2026 06:43:06 +0000 Received: from fout-a3-smtp.messagingengine.com ([103.168.172.146]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xJQ2R-000000008vt-1C0P for pgsql-bugs@lists.postgresql.org; Wed, 21 Oct 2026 06:43:05 +0000 Received: from phl-compute-01.internal (phl-compute-01.internal [10.202.2.41]) by mailfout.phl.internal (Postfix) with ESMTP id D0391EC01DC for ; Wed, 21 Oct 2026 02:43:02 -0400 (EDT) Received: from phl-frontend-03 ([10.202.2.162]) by phl-compute-01.internal (MEProxy); Wed, 21 Oct 2026 02:43:02 -0400 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=fm2; t=1792564982; x=1792651382; bh=sNRYtBxjxs r/93LA6XtlxvUtH4/HOiTnK6ZfJ0p1URE=; b=H2Fx4teE1LrZXXlEwTnKrvDwTP mOrRK0UAUCLqCqXrBIfet9rautQULoEx7hmk+sEAjoyd4Ilr5Uc7olL7rKRYu4LH kClMOsFNyIM+IR6rF7OFxPm8yTpuv0HmycX5J5gzp4KVmOOvUE31+z+cHyvDmogU 1xMqFslDiot2U6yM/q9ziLqkSe+w7t5SO6o/8c64nBwi1xOerCZfA4m75U/AHZkL BpF6oUwL8teWU2x1V7t3jVb6v29Nt8MtnB9eTtKmCQwLu14eK/I9pWfuZ3rBTUNc 5iNdDLR6qX3keooCbxxIzZUz2h07tbwezDAAfTIwZA77L3stXSu00etNUbkw== 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=fm2; t= 1792564982; x=1792651382; bh=sNRYtBxjxsr/93LA6XtlxvUtH4/HOiTnK6Z fJ0p1URE=; b=QHNO6Y7iN72edqd4uYBKo0koZfYLI0ImoZqEpYzPrI4G2hmGXqp 7Er5jfOyPVoMsWxPwufRYtRMOLIK4kd1m3/9dgf4sTQEPlCPRUREiSFYqiTk1cNB ZJTPFwdEsOOK3CU5aPGKoYoj5I1eLJ64Ifc2JuPe69TuZXwLOQr5tKxyPJBRX9Yy els7wLmMM0ti6A5bDBWhljJnVTdTlUD5gpX6F1yFzPTuvwpNG06oeDJ4yS7y0TJm HeyzerZ4OvMKWqG4ojXmos6os7RH707fEhnCChBPQf0/FF1atynAs5qrApVsNPe8 7AUzfRWpSrMqE5PWfCPQwU0ffFs0RcSXT3Q== X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-07; repo=github.com/dkim2wg/interop; date=2026-10-18; sw=lmtpprox; action=sign d=paquier.xyz a=rsa-sha256; DKIM2-Signature: i=1; m=1; t=1792564982; d=paquier.xyz; mf=PG1pY2hhZWxAcGFxdWllci54eXo+; rt=PHBnc3FsLWJ1Z3NAbGlzdHMucG9zdGdyZXNxbC5vcmc+; s=fm2:rsa-sha256:UWzoadD3zpjOVkCz9xnowmhj6SiA8bW6n3xIBpkH1rBBXnT BQ9AmOolXco90qy660mYVXiZnimdLfWNdazRsliW2qcodeif6sT3/UCY/4P7R4wB mkRV+V5V43RSHzbVQrjD1NKnBQHo2zBMxUK6KMqyUuC98ufRNsOQVCmVEL2J/5fh I3S0j6ECCf1VocYSw5MnKD/riox+590qxXAbq340n/uqaxSOOc6t8vs1A/cEwFB3 JS8iuwdfHVsYyjy/VumJKi4hqUk35KMohKCoIVwR2MuWrgh7tQroj4UEAQRLqQfC GqH2nNhhYLgb+YsjUcQVtBdH2pbOg98znCv/EGA==; X-DKIM2-Info: draft=ietf-dkim-dkim2-spec-07; repo=github.com/dkim2wg/interop; date=2026-10-18; sw=lmtpprox; action=mi-m=1; hc=12; hn=cc,content-disposition,content-type,date,feedback-id,from, in-reply-to,message-id,mime-version,references,subject,to; Message-Instance: m=1; h=sha256:6K9GmchUGdfgp4lwWNvKaT9Gaht4hZVBJbNiPJHo1YM=:F0Ds/VWl3fp3DoSvA3uYxBvMx6a0Qjm8DDiVYpI0/I4=; X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: dmFkZTF2H1LYfd3apFMbM8Qwi6uoM9T/aKn0lPixHz8MtMfr3n27UWvzRJDVxh12dydHOT H3Jq4wmGLK91ryHkNwjHWiQPNdawZ6Kjt3h9hEYHeu29dAwBV0Jq0RAVdebx2ntN3vozsL S7T3Ds/kM7d1ADd8/WIO5njYsooKcMMYOgkrfvy/jN/rczeeGUE9fUGKXzbVoe/I5qUF18 Metx0IadjxVLHr3v69WJz7VEakoNW4pBovbDEe3Uloc7PoLvweiW3jN7KqPIRSci+6LxnN NUQxLRtSKeZB3Ivw/PnSa5ABzx7olbnPUk0KqO4m0sxF2q81Bcrhr9L2byh3AiAnCsAMhD 0ZuUKLkxdw+UaCgeoHp7Y7vI/BQs27lh09KQ8bx21RGCYZTolDKrK+/5tFkJEzlNmsX60I MjJDd0FP+BjjEosXU+VZuPYSqy2ABgIC4xS/PYjyeTb3qu6iHWVUIh58nKeAypqOi9occ2 1OXq1R12HT48dkBqBvZ/md/0LZtePAW19l8gmbtNI/4w4YOnrhFuO1O6U/hQARHZVJADND zbUa9IHz3P//gWauVx/xqWsnsmTU8zDoj3o2rkGQIOIX1FRXHvvEaP+Bm24VY4jd5nDLpl EZ5XvnWJyamVHRH50312gy0droUIawyukG5Wj0jQfkwB9nOhGaC9psRySjig X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 21 Oct 2026 02:43:01 -0400 (EDT) Date: Wed, 21 Oct 2026 15:42:58 +0900 From: Michael Paquier To: Staroverov Ilja Cc: Sami Imseih , "pgsql-bugs@lists.postgresql.org" Subject: Re: pg_stat_statements replaces SQL/JSON ON EMPTY / ON ERROR keywords with parameters Message-ID: References: <457969A9-5D24-422F-B09E-F388053DE028@localhost.localdomain> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="WD7pxWNeUxfFPSu6" Content-Disposition: inline In-Reply-To: <457969A9-5D24-422F-B09E-F388053DE028@localhost.localdomain> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --WD7pxWNeUxfFPSu6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 19, 2026 at 05:16:42AM +0000, Staroverov Ilja wrote: > A correction to my previous message: it's not the number of columns > that was part of the query ID, but the references to the columns from > the rest of the query, such as the expansion of SELECT *. The commit > message now says that. >=20 > The test in 0002 now also checks that queries which differ only in > column names or path names are merged, and that columns without PATH > and with different names are not. The PLAN clause doesn't exist in > REL_19_STABLE, so the test doesn't use it; I checked those cases on > master by hand. The series applies to master and REL_19_STABLE, and > I've tested it on both. When it comes to such problems, I'd suggest to implement the tests as a first patch, then do the jumbling logic in a second patch that shows the changes in PGSS. It's easier to see what you think is the "wrong" information and what becomes the "right" information ("wrong" and "right" mean what you think is OK or not OK in terms of PGSS monitoring). + 2 | SELECT * FROM JSON_TABLE($1::jsonb, $2 = + + | COLUMNS (a int PATH $3 DEFAULT $4 ON EMPTY)) jt + 1 | SELECT * FROM JSON_TABLE($1::jsonb, $2 = + + | COLUMNS (a int PATH $3)) jt + 2 | SELECT * FROM JSON_TABLE($1::jsonb, $2 = + + | COLUMNS (a int PATH $3, = + + | NESTED PATH $4 AS p1 COLUMNS (b int PATH $5))) jt + 1 | SELECT * FROM JSON_TABLE($1::jsonb, $2 = + + | COLUMNS (a int)) jt + 1 | SELECT * FROM JSON_TABLE($1::jsonb, $2 = + + | COLUMNS (a text PATH $3)) jt + 1 | SELECT * FROM JSON_TABLE($1::jsonb, $2 = + + | COLUMNS (b int)) jt There are many more keyword patterns than the ones tested here, like PASSING, PLAN (UNION, OUTER ..), FORMAT JSON, etc. None of them are covered. I guess that you may want to worry about them. Instead of bloating more select.sql, let's move the JSON tests into a different input file. They can be isolated, and there are way more patterns than what you are showing here. Note that none of this is backpatchable, as this impacts the Node definitions and the query IDs computed. -- Michael --WD7pxWNeUxfFPSu6 Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmrYXvIACgkQnvQgOdby QH1gkRAApxaua1ujXqz4LPr0FxF9lHNgvltRlI3T+ODiIzgYHZGxpM1W1OmGv5uS Vz6oxCwcLb8/k9+kdNRPr20Ry+0FKLGy/AMg//6u4nOGSqWh38kvSLNWGOML73to NZ8kPr7s7X33Qaz5YG8dAXnOz23NGzy3nvd4OKGpu7S07c0syVZEUjsFT5rrjbeW inmx5wJNjHlYIWaRfNGqejS1lfAFiksGXJISFatMCrbyQN6dHhIMGesRdEkpCU1D 4CPfU1ZhweP8sQlupANaXcqF3nZ8fQ/W5vwPR9ZoKclFP4g082M8EOHlwHZAXyeW aFnbWYfvVv12yDEiOmBLDpzmg/BoMgfqzKGB+/QEMYymNBZ4k4mzQ3LMh7snbpqL 0qXHT4+gqgCmeqsFXdV5mmsDbQH05v9Z3H9DJcR8p79bBF/0QtZnADP+pqwviOFs b7xgHBvKfcIcEIbEY/pFQQE8sz9aP3mvl29HIex0v0+JuWMAAdsVof12VfBrUMjI v9fHMg16E4GD1KhAkU8X3bOekOVwmkTCgx5kiMQk/Qi/JBELNSNowI9Oiojezk/0 0J78lg5sSAc+9eXoIo7phHVB0KHg7zXtSJKTFqyOIhhINxUdHogT3jCMXUkTp4U2 dMjOzFyY0zeDWmabyojymRMfMSD//+MBPWiZeza58147TQn2WuI= =tKfZ -----END PGP SIGNATURE----- --WD7pxWNeUxfFPSu6--