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 1ghgKm-00030C-HR for pgsql-hackers@arkaria.postgresql.org; Thu, 10 Jan 2019 19:49:44 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ghgKl-0003X0-8O for pgsql-hackers@arkaria.postgresql.org; Thu, 10 Jan 2019 19:49:43 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ghgKk-0003Wt-TR for pgsql-hackers@lists.postgresql.org; Thu, 10 Jan 2019 19:49:43 +0000 Received: from mail-qt1-x843.google.com ([2607:f8b0:4864:20::843]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ghgKi-0007iR-53 for pgsql-hackers@postgresql.org; Thu, 10 Jan 2019 19:49:41 +0000 Received: by mail-qt1-x843.google.com with SMTP id n32so14951514qte.11 for ; Thu, 10 Jan 2019 11:49:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=vaZC/h2NBV4eicruUAJ25Df/CA5PoYS3HCNvqun+naw=; b=g5hwjhd1BQpHE/0qKkmdphxeFS5bux790xyZzxEkXOxraa2Vs9Z19y4wlQN4OGOLOD gtSP9VGiVaPQIdyGeCEZs/G+TRxUpVo0p9db6Z5gfZ7t3ZH7e6no3Xp2he3uLP63jwq0 Onf9nLpEuogu7H8UPKj9WFfl3wLj8s+PNy+f/kte434Oa94JjallKFalFH3ZMOww/6hS pkqxuYVY+tAAn732KCnQkp4+3ZXsE3zHsusfvw16j7STAxcKSyrCJ6B4rSHJz9FxAfT/ Y0ruXIPMdibxkj8/Xo32vn9LzevwGVL00QFfW/5MH6c/Lxbwbems5SFe68Oge4kW1dn/ 8oMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=vaZC/h2NBV4eicruUAJ25Df/CA5PoYS3HCNvqun+naw=; b=uL1mWZ0qNrJrgNN/lOL85WKlKLjJ+nh0BCWDGg5abn7lnaAYTbkfubmjXl4vCbpEgN ZO62/K0d/xQwybZPgBzg3pib2dYQ2hDwnd39uMZCEULoLhP6dBDqYchwr04G6TBXkQzo 1K4HqCjFG7p4xjBibtjF1mIgyxxzuC2ULI1YyoeZmLR4lunHmdvn0+hEtInN3g7kowXL d3uGkoPPlNHaaoOti7B6WqELfwaxrd1wM1eUaYvxBevNNmok7CpSUw6HLURidhi9V4lZ XT1ChozEV032fHUcNNdjuqrtteQTPIzPB/uqRhwzMyZmNknXuUcC2vXXLFDMtBN8JH8z VULw== X-Gm-Message-State: AJcUukd5ExgCTyhCnEoaz0/JRvjktH83dQGzqTxxl+Z06O2Y5G8LKL5x wcEFur6L3dBX5jXQolPnC9Vlkg== X-Google-Smtp-Source: ALg8bN4EPdTr8vDQ0a9EHp0o2L/uthz1dX63FdQNBdHaD4VIDuroFOZUfqH3qWQlCt0DTvVH5YwEdQ== X-Received: by 2002:a0c:e486:: with SMTP id n6mr11335593qvl.210.1547149779148; Thu, 10 Jan 2019 11:49:39 -0800 (PST) Received: from alvin.alvh.no-ip.org ([190.121.29.3]) by smtp.gmail.com with ESMTPSA id j38sm48464119qtj.72.2019.01.10.11.49.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 Jan 2019 11:49:38 -0800 (PST) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id DF759762; Thu, 10 Jan 2019 16:49:35 -0300 (-03) Date: Thu, 10 Jan 2019 16:49:35 -0300 From: Alvaro Herrera To: Tom Lane Cc: Fabien COELHO , Michael Paquier , Stephen Frost , Andrew Dunstan , PostgreSQL Developers Subject: Re: [HACKERS] pgbench - allow to store select results into variables Message-ID: <201901101949.wdjmpfsh6hzw@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4245.1547147665@sss.pgh.pa.us> User-Agent: NeoMutt/20180716-1013-2c1e88 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 2019-Jan-10, Tom Lane wrote: > 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. Hmm, I suppose that's true. > > 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. There's a lot of the new code in pgbench that can be simplified if we remove \cset. I'll leave time for others to argue for or against cset, and then act accordingly. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services