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.94.2) (envelope-from ) id 1tbzYS-00EomO-BY for pgsql-hackers@arkaria.postgresql.org; Sun, 26 Jan 2025 10:07:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tbzYP-006bKC-Eh for pgsql-hackers@arkaria.postgresql.org; Sun, 26 Jan 2025 10:07:45 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tbzYP-006bK2-0G for pgsql-hackers@lists.postgresql.org; Sun, 26 Jan 2025 10:07:45 +0000 Received: from forwardcorp1a.mail.yandex.net ([2a02:6b8:c0e:500:1:45:d181:df01]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tbzYJ-001a5F-0a for pgsql-hackers@lists.postgresql.org; Sun, 26 Jan 2025 10:07:41 +0000 Received: from mail-nwsmtp-smtp-corp-main-62.myt.yp-c.yandex.net (mail-nwsmtp-smtp-corp-main-62.myt.yp-c.yandex.net [IPv6:2a02:6b8:c12:5a2a:0:640:6073:0]) by forwardcorp1a.mail.yandex.net (Yandex) with ESMTPS id E51D160B7E; Sun, 26 Jan 2025 13:07:34 +0300 (MSK) Received: from smtpclient.apple (unknown [2a02:6b8:b081:6523::1:29]) by mail-nwsmtp-smtp-corp-main-62.myt.yp-c.yandex.net (smtpcorp/Yandex) with ESMTPSA id X7YqUW1IbCg0-Ejt04T1Z; Sun, 26 Jan 2025 13:07:34 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex-team.ru; s=default; t=1737886054; bh=HXKEsqM2/dmPEUGqES3SKOCFF7WaBA9kkiSloGz62b0=; h=Message-Id:To:Date:References:Cc:In-Reply-To:From:Subject; b=uXFFrYwN7gJxSb2o2vsj6O1ppfTjb410sFSw4gxMcVTd1zmFacecMqjj/jqiLHF8d or44cG8aOAfytNKGMb6uR/qV7Ii5g7RhPN3u291+/R5Swp4Ig5sLfamB7IGdmTAf2W mMg2eyXnZI2OmAOgpAzy256pEhstnLNbqQWwQjSc= Authentication-Results: mail-nwsmtp-smtp-corp-main-62.myt.yp-c.yandex.net; dkim=pass header.i=@yandex-team.ru Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51.11.1\)) Subject: Re: Using Expanded Objects other than Arrays from plpgsql From: Andrey Borodin In-Reply-To: <3363452.1737483125@sss.pgh.pa.us> Date: Sun, 26 Jan 2025 15:07:22 +0500 Cc: Michel Pelletier , Pavel Stehule , pgsql-hackers@lists.postgresql.org Content-Transfer-Encoding: quoted-printable Message-Id: <0AC229FA-A3F1-43FD-B0DC-A46A73FEAFF7@yandex-team.ru> References: <1342498.1729444411@sss.pgh.pa.us> <1445998.1729482404@sss.pgh.pa.us> <2062830.1729625620@sss.pgh.pa.us> <2265411.1729699470@sss.pgh.pa.us> <2354718.1729737539@sss.pgh.pa.us> <2581216.1729794746@sss.pgh.pa.us> <1948345.1730500073@sss.pgh.pa.us> <3797606.1732045516@sss.pgh.pa.us> <647219! .1736019347@sss.pgh.pa.us> <1417389.1736964543@sss.pgh.pa.us> <3363452.1737483125@sss.pgh.pa.us> To: Tom Lane X-Mailer: Apple Mail (2.3776.700.51.11.1) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello everyone in this thread. > On 21 Jan 2025, at 23:12, Tom Lane wrote: >=20 > somebody will review this I'm trying to dig into the patch set. My knowledge of the module is = shallow and I hope to improve it by reading more patches in this area. This patch set provides a new test, which runs just fine without the = patch. But it's somewhat expected, such optimizations must be = transparent for user... And the coverage of newly invented mark_stmt() 42.37%. Some of branches = are easy noops, but some are not. I assume as a granted that we will not every get into infinite loop in a = recursive call of mark_stmt(). expr_is_assignment_source() is named like if it should return nool, but = it's void. I could not grasp from reading the code one generic question about new = optimization rule. What cost does checking for possible in-place update = incurs to code cannot have this optimization? Is it = O(numer_of_arguments) of for every assignment execution? Thanks! Best regards, Andrey Borodin.=