Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oFYWk-0005m0-CU for pgsql-hackers@arkaria.postgresql.org; Sun, 24 Jul 2022 10:07:58 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oFYWj-0006vQ-2J for pgsql-hackers@arkaria.postgresql.org; Sun, 24 Jul 2022 10:07:57 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <9erthalion6@gmail.com>) id 1oFYWi-0006vG-KH for pgsql-hackers@lists.postgresql.org; Sun, 24 Jul 2022 10:07:56 +0000 Received: from mail-ed1-x530.google.com ([2a00:1450:4864:20::530]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from <9erthalion6@gmail.com>) id 1oFYWc-0006E5-97 for pgsql-hackers@postgresql.org; Sun, 24 Jul 2022 10:07:56 +0000 Received: by mail-ed1-x530.google.com with SMTP id v12so10589705edc.10 for ; Sun, 24 Jul 2022 03:07:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=N5gPUUxI+bsk3XhgvU0seqz6DfBOacHcuRhk6YwYqIc=; b=L7aE+JEZJLMifQKpSmuywD9I8N+sLC3K1ftI4eHWKmuQEtAfCzEBaodAdcACeyFwvf Xn5+guTHXnLo+tCZpYr9GwGgL7hPnphC1vX5gGbFGTZ1PdL9NET8avic4RPtI99mUtUf pCKHR8XgOFckp5PxSvQJMndXR2YRr2v0jsbDBTaZ4laZ4GOY3lET0cBxA52CVe8kx0rH d1ea7Hpelux/IX6t8kjWbk964Br6fpbf2R9ZIdeXN693H7UAocNQM6dM7DnwadaJVJll 8bA5QwLfK7wKadEBGEKNdygvFEpOsy13Iqf03/IDCeQCBOghrLw32qtykqLTsXY+OL9I ie2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=N5gPUUxI+bsk3XhgvU0seqz6DfBOacHcuRhk6YwYqIc=; b=Q38o2pLvQ94fE4AEOc/0uoC53a0zUEvv7rAxAC9TB+kSCGTOlxVm7rpowjtwVDst4r T9wVfjq0Ze9BVLu4ec9a/61eVkeJDS6FSwTq6PjXRGBq/zReiGF3j3p3nyrLkJ9InZ67 lAh6DZW4G7/HbxQEVBeUiG6vGClkwnyhWrxbKM5E+6/gjxVvkG0sDhBi5ylt4UAmQAeJ Nx2NJ9LOlDsrTV4oyiSL85DIxv7z3/9/axtog90nO5nvE4bVwJQI1Y67Cvf8FWLZr56c iTO2tjealvcAfRfpv4+5cXm1/JgQJFfkHqapMAsgRHPEfaBS8FFXevNnwKroKYVYG42U OwPA== X-Gm-Message-State: AJIora80r0p1EfGdOi5Yvuvp0726aKo8M1MjDX43YgVpzYJ/ahDvrIFq Fh1lA1eiOCdL6SzmmFZFctg= X-Google-Smtp-Source: AGRyM1uKWjskXDAGI+59M0jCbqkZm1l9cVIuOAKEOf93Wp7TDdO2qBbs9Uj66cGlhCDNs8SvXFaQoQ== X-Received: by 2002:aa7:c784:0:b0:43a:caa8:75b9 with SMTP id n4-20020aa7c784000000b0043acaa875b9mr7743626eds.311.1658657268321; Sun, 24 Jul 2022 03:07:48 -0700 (PDT) Received: from erthalion.local (dslb-094-222-027-106.094.222.pools.vodafone-ip.de. [94.222.27.106]) by smtp.gmail.com with ESMTPSA id v15-20020aa7dbcf000000b0043bbc9503ddsm5403345edt.76.2022.07.24.03.07.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Jul 2022 03:07:46 -0700 (PDT) Date: Sun, 24 Jul 2022 12:06:36 +0200 From: Dmitry Dolgov <9erthalion6@gmail.com> To: Tom Lane Cc: Robert Haas , Zhihong Yu , David Steele , PostgreSQL-development , Greg Stark , Pavel Trukhanov Subject: Re: pg_stat_statements and "IN" conditions Message-ID: <20220724100636.do3nt7f73d7zbrfx@erthalion.local> References: <655954.1646932319@sss.pgh.pa.us> <20220312141030.5panohzsskr4zpkk@erthalion.local> <20220314145734.x3re4hcr6ukmppwi@ddolgov.remote.csb> <178940.1647271397@sss.pgh.pa.us> <20220314153346.6chynq26mcypxaco@ddolgov.remote.csb> <180607.1647272303@sss.pgh.pa.us> <20220314155150.mgitoto7e5jkqilb@ddolgov.remote.csb> <20220326174035.2vwhtof6ow7kib7n@erthalion.local> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="wkn7hnegdugx3cwo" Content-Disposition: inline In-Reply-To: <20220326174035.2vwhtof6ow7kib7n@erthalion.local> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --wkn7hnegdugx3cwo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline > On Sat, Mar 26, 2022 at 06:40:35PM +0100, Dmitry Dolgov wrote: > > On Mon, Mar 14, 2022 at 04:51:50PM +0100, Dmitry Dolgov wrote: > > > On Mon, Mar 14, 2022 at 11:38:23AM -0400, Tom Lane wrote: > > > Dmitry Dolgov <9erthalion6@gmail.com> writes: > > > > On Mon, Mar 14, 2022 at 11:23:17AM -0400, Tom Lane wrote: > > > >> I do find it odd that the proposed patch doesn't cause the *entire* > > > >> list to be skipped over. That seems like extra complexity and confusion > > > >> to no benefit. > > > > > > > That's a bit surprising for me, I haven't even thought that folks could > > > > think this is an odd behaviour. As I've mentioned above, the original > > > > idea was to give some clues about what was inside the collapsed array, > > > > but if everyone finds it unnecessary I can of course change it. > > > > > > But if what we're doing is skipping over an all-Consts list, then the > > > individual Consts would be elided from the pg_stat_statements entry > > > anyway, no? All that would remain is information about how many such > > > Consts there were, which is exactly the information you want to drop. > > > > Hm, yes, you're right. I guess I was thinking about this more like about > > shortening some text with ellipsis, but indeed no actual Consts will end > > up in the result anyway. Thanks for clarification, will modify the > > patch! > > Here is another iteration. Now the patch doesn't leave any trailing > Consts in the normalized query, and contains more documentation. I hope > it's getting better. Hi, Here is the rebased version, with no other changes. --wkn7hnegdugx3cwo Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v8-0001-Prevent-jumbling-of-every-element-in-ArrayExpr.patch"