Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bLrkn-0002qT-IW for pgsql-hackers@arkaria.postgresql.org; Sat, 09 Jul 2016 12:53:05 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bLrkm-00037R-E1 for pgsql-hackers@arkaria.postgresql.org; Sat, 09 Jul 2016 12:53:04 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bLrkk-00036X-1i for pgsql-hackers@postgresql.org; Sat, 09 Jul 2016 12:53:02 +0000 Received: from boipeva.ensmp.fr ([194.214.158.136]) by makus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bLrkf-00031P-Qm for pgsql-hackers@postgresql.org; Sat, 09 Jul 2016 12:53:00 +0000 Received: from cri.ensmp.fr (AGrenoble-653-1-69-83.w92-129.abo.wanadoo.fr [92.129.7.83]) (authenticated bits=0) by boipeva.ensmp.fr (8.15.2/8.15.1/JMMC-22/Oct/2013) with ESMTPSA id u69CqpSB000969 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sat, 9 Jul 2016 14:52:52 +0200 Date: Sat, 9 Jul 2016 14:52:51 +0200 (CEST) From: Fabien COELHO X-X-Sender: fabien@sto To: Pavel Stehule cc: PostgreSQL Developers Subject: Re: pgbench - allow to store select results into variables In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Miltered: at boipeva.ensmp.fr with ID 5780F3A3.000 by Joe's j-chkmail (http : // j-chkmail dot ensmp dot fr)! X-j-chkmail-Auth: USER-ID fabien.coelho X-j-chkmail-Enveloppe: 5780F3A3.000 from AGrenoble-653-1-69-83.w92-129.abo.wanadoo.fr/AGrenoble-653-1-69-83.w92-129.abo.wanadoo.fr/92.129.7.83/cri.ensmp.fr/ X-Pg-Spam-Score: -3.2 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org >> Also a more subjective argument: I do not like the gset automagic naming >> feature. I got more inspired by PL/pgSQL and ECPG which both have an "into" >> syntax with explicit variable names that let nothing to guessing. I like >> things to be simple and explicit, hence the proposed into. > > the gset was originally designed differently - but now it is here - and it > is not practical to have two different, but pretty similar statements in > psql and pgbench. In my view they are unrelated: on the one hand "gset" is really an interactive feature, where typing is costly so "automagic" might make sense; on the other hand "into" is a scripting feature, where you want to understand the code and have something as readable as possible, without surprises. The commands are named differently and behave differently. If someone thinks that "gset" is a good idea for pgbench, which I don't, it could be implemented. I think that an "into" feature, like PL/pgSQL & ECPG, makes more sense for scripting. -- Fabien. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers