pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Fabien COELHO <coelho@cri.ensmp.fr>
Cc: Michael Paquier <michael@paquier.xyz>
Cc: Stephen Frost <sfrost@snowman.net>
Cc: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
Cc: PostgreSQL Developers <pgsql-hackers@postgresql.org>
Subject: Re: [HACKERS] pgbench - allow to store select results into variables
Date: Thu, 10 Jan 2019 14:14:25 -0500
Message-ID: <4245.1547147665@sss.pgh.pa.us> (raw)
In-Reply-To: <201901101900.mv7zduch6sad@alvherre.pgsql>
References: <201901101900.mv7zduch6sad@alvherre.pgsql>

Alvaro Herrera <alvherre@2ndquadrant.com> 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




view thread (120+ messages)  latest in thread

Message-ID: <4245.1547147665@sss.pgh.pa.us>
Permalink:  ../4245.1547147665@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/4245.1547147665@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, alvherre@2ndquadrant.com, coelho@cri.ensmp.fr, michael@paquier.xyz, sfrost@snowman.net, andrew.dunstan@2ndquadrant.com
  Subject: Re: [HACKERS] pgbench - allow to store select results into variables
  In-Reply-To: <4245.1547147665@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox