Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ghfmr-0000cM-CM for pgsql-hackers@arkaria.postgresql.org; Thu, 10 Jan 2019 19:14:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ghfmo-0000Hw-EH for pgsql-hackers@arkaria.postgresql.org; Thu, 10 Jan 2019 19:14:38 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ghfmo-0000Cd-6G for pgsql-hackers@lists.postgresql.org; Thu, 10 Jan 2019 19:14:38 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ghfmk-0001ga-Bq for pgsql-hackers@postgresql.org; Thu, 10 Jan 2019 19:14:36 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x0AJEQ9F004246; Thu, 10 Jan 2019 14:14:26 -0500 From: Tom Lane To: Alvaro Herrera cc: Fabien COELHO , Michael Paquier , Stephen Frost , Andrew Dunstan , PostgreSQL Developers Subject: Re: [HACKERS] pgbench - allow to store select results into variables In-reply-to: <201901101900.mv7zduch6sad@alvherre.pgsql> References: <201901101900.mv7zduch6sad@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Thu, 10 Jan 2019 16:00:33 -0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <4244.1547147665.1@sss.pgh.pa.us> Date: Thu, 10 Jan 2019 14:14:25 -0500 Message-ID: <4245.1547147665@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Alvaro Herrera writes: > On 2019-Jan-10, Tom Lane wrote: >> This \cset thing seem like an incredibly badly thought out kluge. >> What is its excuse to live? > The reason is that you can set variables from several queries in one > network trip. So who needs that? Just merge the queries, if it's so important that you avoid multiple round trips. > We can take it out I guess, but my impression was that we already pretty > much had a consensus that it was wanted. Maybe if the implementation weren't a pile of junk it'd be all right, but as-is this is a mess. The dependency on counting \; in particular is setting me off, because that has little if anything to do with the number of query results to be expected. I imagine the argument will be that nobody would write the sort of queries that break that assumption in a pgbench script; but I don't find that kind of design to be up to project standards, especially not when the argument for the feature is tissue-thin in the first place. regards, tom lane