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 1nYAPe-0007sQ-6O for pgsql-hackers@arkaria.postgresql.org; Sat, 26 Mar 2022 17:41:18 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nYAPc-0006FW-Uk for pgsql-hackers@arkaria.postgresql.org; Sat, 26 Mar 2022 17:41:16 +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 1nYAPc-0006F8-Ii for pgsql-hackers@lists.postgresql.org; Sat, 26 Mar 2022 17:41:16 +0000 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from <9erthalion6@gmail.com>) id 1nYAPZ-00026U-TE for pgsql-hackers@postgresql.org; Sat, 26 Mar 2022 17:41:16 +0000 Received: by mail-ej1-x629.google.com with SMTP id lr4so12577752ejb.11 for ; Sat, 26 Mar 2022 10:41:13 -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=3MxwX9QCA2yDbVIyrE5rfF+fubNsrL5aCPnEv9bqzFE=; b=Hd4lb2PooNLUrqFMvtgvaA1wbw/Y69799umuTytR8VSgHE7Dxr+fQ3q/nPJcZuzNpC cvaglwZKOyvOcoPMZTO06CbjXMd0Wgty55pozbWOkwXGgCbo7Fmua2lRIOu+msDq4Fj7 cOTWrzfclWFkgMlDHk6oSft+4YdlJycMC5sIPQDOKrsKEmDYCtry5zPpnmgL37du0NVd oKwK0K6AVLzRAhpEthTxjh1PgIPOFwr6luN5dBjy2cGHdnD0W0avpQe8hjQ0wUH2VbAu tF/k7eccL3SBGmTyxcv5kMDLS8LHjP9f+xqi5o3vY0Wol9/4u/iajCMkh7XxL+ENIQXc IUkw== 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=3MxwX9QCA2yDbVIyrE5rfF+fubNsrL5aCPnEv9bqzFE=; b=J8xhV/DeSgCUXRG1OUSPFLV1TDr9pWzReKRjYooXdbNC3vQdnHEiBHqzV6AvB0wrRf GcwZgdQZR5Vlo8DXc8k5tWWcdyJmZrVg2G6Y4T8GVvOuE5SYgKoXeojiw9SnhI5RuQPR 4ABaFuM2Xzrd3QbgsP1tRqgm/2J+XHe8iarH3K09bb6FVAVtt4lSHXBBmcP/vmYYR57C yf3qc2PLyUvmKc/JtEhZGjfLupBXqgFd6nqB748GqbTYIxHXhcBIpK3OTtPqa8s/kveE LI74doG7K7CwlNQSmFXPc7AzWU+RzqqLDq3yBoC+sGZMLt+B/EtfGTpOrn1uYXKmfGsG lMCA== X-Gm-Message-State: AOAM533ixtGEwrnMlGDt69EiORNq5c7Sk8/6Gyc9A0itAvnxOyKPACto u2xovW1ENw9e1S9ia9ZgQ3U= X-Google-Smtp-Source: ABdhPJwjRTFGYKjVz52agR+K+25dsmS850oaIir8HkU4JKBegxkObI9+LGfGXO6Dxg29JhIamDc9UQ== X-Received: by 2002:a17:906:7316:b0:6d7:16be:b584 with SMTP id di22-20020a170906731600b006d716beb584mr18182474ejc.759.1648316472275; Sat, 26 Mar 2022 10:41:12 -0700 (PDT) Received: from erthalion.local (dslb-094-222-030-091.094.222.pools.vodafone-ip.de. [94.222.30.91]) by smtp.gmail.com with ESMTPSA id sb31-20020a1709076d9f00b006ceb969822esm3661803ejc.76.2022.03.26.10.41.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 26 Mar 2022 10:41:11 -0700 (PDT) Date: Sat, 26 Mar 2022 18:40:35 +0100 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: <20220326174035.2vwhtof6ow7kib7n@erthalion.local> References: <20220310163837.pzvr4yntdk33cbkb@ddolgov.remote.csb> <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> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="5qgietps523nzm32" Content-Disposition: inline In-Reply-To: <20220314155150.mgitoto7e5jkqilb@ddolgov.remote.csb> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --5qgietps523nzm32 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline > 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. --5qgietps523nzm32 Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="v7-0001-Prevent-jumbling-of-every-element-in-ArrayExpr.patch"