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 1rTD63-0018fG-9L for pgsql-bugs@arkaria.postgresql.org; Fri, 26 Jan 2024 03:41:39 +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 1rTD61-008MNP-Pl for pgsql-bugs@arkaria.postgresql.org; Fri, 26 Jan 2024 03:41:37 +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 1rTD61-008MNG-H6 for pgsql-bugs@lists.postgresql.org; Fri, 26 Jan 2024 03:41:37 +0000 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rTD5u-003PHv-Rn for pgsql-bugs@lists.postgresql.org; Fri, 26 Jan 2024 03:41:36 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 393653200ABE; Thu, 25 Jan 2024 22:41:29 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Thu, 25 Jan 2024 22:41:29 -0500 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=fm3; t=1706240488; x=1706326888; bh=zFaZyubspf uvKrRXKo9UfQKF5f6b6Q1wpyrEv0fSLG8=; b=EB5GRXq2IkOb0wc4+KULaKVsU4 2rs4Y/8zl7Uz+DC+c9GvmDhSU3M+ACj4N5qVhgI2V/BWnVj1vv7F+J/ioxUhI+jt P8BtXTis952iQWgjAGnh/7Sl4G339iKttfKtIWQq5UEpVXrlytPBvAAV5bb2Grh2 2Bo19IV7PZY0z2LgBwzsGMWfdTzNXieVyoNSUnyu4vy5LuNHRTI4O4YAAOhIstWg f3D4mGvFzxUwtWgqjteRBcnZuHJOsKf1Yuqc8qzUuCvI+zqiqPFe9MwXc8v7evS5 xldRvxKzkZxSw5SV/38veXcqqBoL2NuD2vtf3idI4uXtbwgBiZvg5xDOIsuA== 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-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1706240488; x=1706326888; bh=zFaZyubspfuvKrRXKo9UfQKF5f6b 6Q1wpyrEv0fSLG8=; b=DCBK3u+Cjdl9KHEOvenm3pZ0muZL5G2C1Rj//qG2r3Lk FCfpJSTv4265J41lxv8ATHVB6tDfx7VtOWyl9YYgm2/Lgxg7gTjicKz8jQbcWWcx 87qYYyd0SdbuLsSug9cqM6HFrEwLxJ8qtsiD4J6YyWXACc5ZYonqw4+C5I95f3cL /vMdhHHkFiICDDeknW6rfY30+QtWeVyO4jkUAefLls/L87l+z6TMWbgwGVjNnm9w Y4xxDQ6NIrZQKdQIAPNl6AuQRaniCen9tUG2FV+LUxuEW49ND09F4anAqjqXL9sW EIpQltcmT1UlOaPIRHdvOQhVTj8BdayxfATeQ1KomQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdeliedgheelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredt tddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesph grqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepteelieefudffhffhtdetleeg geegfffhkeeuveetiefgudduvedutefggeeivdejnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiih ii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 25 Jan 2024 22:41:27 -0500 (EST) Date: Fri, 26 Jan 2024 12:41:16 +0900 From: Michael Paquier To: Tender Wang Cc: Alexander Lakhin , pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18310: Some SQL commands fail to process duplicate objects with error: tuple already updated by self Message-ID: References: <18310-1eb233c5908189c8@postgresql.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="bVGkqYIUohwo1B7L" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --bVGkqYIUohwo1B7L Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Fri, Jan 26, 2024 at 11:33:24AM +0800, Tender Wang wrote: > How about using list *res replace int *res in getTokenTypes(), so we can > use list_append_unique(). > In outer function, use list *tokens to replace int *tokens, and ntokens = > list_length(tokens) not list_length(stmt->tokentype). Yeah, I was wondering about this code path. If you feel strongly about that, would you like to write a patch? -- Michael --bVGkqYIUohwo1B7L Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmWzKdwACgkQnvQgOdby QH2Klg/+LcdJS9adycM68QgHICW2Fjslw6m23dJArSQgZcUJZQqwO6wjZM/VDWpl XEje8C4S5suyZgmAbR+wAEHa7j3sB0TVPwTpSFc4Pc7H/zxb7mTjy4gmYLIjcM+2 aGInV1cTerJ0t6sFk1dYjyjpiR7F7Uylphr6VGIivTijcV+4mflyqNvkRgZTkFSC AEwZm92kfxhhLIQ2o+PGYl2+I8BHL/Z4JBV72SZczIcyB61xpGS0/amoAVch4h+w 8mfXtWFMjh/l7X8oUG8IB4/WBeg+BbecSwPTdq5nBqIU/98nXPDEEc+rHI7ECgVq Q9+h4TREvOZ0D7INUdkC0ZskEaS8iHBaYlCWZh02ux7q4nZVbI6F4m52tRsNJqNV MnG3NK7tN9I3ES8NFPFsWS/ePG/Ujcme7yG7w75Wdc4KLfQp6YlSV9dT1pbf4NL5 5EWrffEbVxew0SLeR3IKQw7ZY/hQIMexu9lhNQ1DD56PKVMfCt8kL82A+f8nT35Q HuMOa5kVoMFW0IvZo1Vp79bTCRE86F1YlNRgOI/xfgwKFQ0v59O+HHvNNMBjwhkY eByt9uQy+GpBWOvRZeXmILScjIlTW1imwSOCG92ETV7SEB4oNRjVXwsLxImlnb2y Bg/qgCabSsme62ljEKMB8dSkriOmeHwV+3tVh+pP5bS6yX6mAUE= =eJ0F -----END PGP SIGNATURE----- --bVGkqYIUohwo1B7L--