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 1lMsqt-0003So-2i for pgsql-hackers@arkaria.postgresql.org; Thu, 18 Mar 2021 13:38:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lMsqr-0007qg-Sb for pgsql-hackers@arkaria.postgresql.org; Thu, 18 Mar 2021 13:38:13 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lMsqr-0007px-Li for pgsql-hackers@lists.postgresql.org; Thu, 18 Mar 2021 13:38:13 +0000 Received: from mail.thelabyrinth.net ([45.56.70.56]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lMsqp-0007bW-N5 for pgsql-hackers@postgresql.org; Thu, 18 Mar 2021 13:38:12 +0000 Received: from desktop.home.thelabyrinth.net (c-73-39-102-148.hsd1.va.comcast.net [73.39.102.148]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: dsteele) by mail.thelabyrinth.net (Postfix) with ESMTPSA id 324B35466F; Thu, 18 Mar 2021 13:38:10 +0000 (UTC) Subject: Re: pg_stat_statements and "IN" conditions To: Zhihong Yu , Dmitry Dolgov <9erthalion6@gmail.com> Cc: PostgreSQL-development , Tom Lane , Greg Stark , Pavel Trukhanov References: <20201118160432.hyko73sqc2bf7nkj@localhost> <20201226104635.uvzkftzu72zg5qux@localhost> <20210105125230.etgmgixnn6fmpszl@localhost> From: David Steele Message-ID: Date: Thu, 18 Mar 2021 09:38:09 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 1/5/21 10:51 AM, Zhihong Yu wrote: > > +   int         lastExprLenght = 0; > > Did you mean to name the variable lastExprLenghth ? > > w.r.t. extracting to helper method, the second and third > if (currentExprIdx == pgss_merge_threshold - 1) blocks are similar. > It is up to you whether to create the helper method. > I am fine with the current formation. Dmitry, thoughts on this review? Regards, -- -David david@pgmasters.net