Re: pgbench - add \aset to store results of a combined query

From: David Steele <david(at)pgmasters(dot)net>
To: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Ibrar Ahmed <ibrar(dot)ahmad(at)gmail(dot)com>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pgbench - add \aset to store results of a combined query
Date: 2020-03-24 15:04:45
Message-ID: 654705d5-5ba3-6feb-d183-af5f54d2cbf0@pgmasters.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 11/29/19 4:34 AM, Fabien COELHO wrote:
>>
>> It seems to me that there is no point to have the variable aset in
>> Command because this structure includes already MetaCommand, so the
>> information is duplicated. [...] Perhaps I am missing something?
>
> Yep. ISTM that you are missing that aset is not an independent meta
> command like most others but really changes the state of the previous
> SQL command, so that it needs to be stored into that with some
> additional fields. This is the same with "gset" which is tagged by a
> non-null "varprefix".
>
> So I cannot remove the "aset" field.
>
>> And I would suggest to change readCommandResponse() to use a
>> MetaCommand in argument.
>
> MetaCommand is not enough: we need varprefix, and then distinguishing
> between aset and gset. Although this last point can be done with a
> MetaCommand, ISTM that a bool is_aset is clear and good enough. It is
> possible to switch if you insist on it, but I do not think it is desirable.

Michael, do you agree with Fabien's comments?

> Attached v4 removes an unwanted rebased comment duplication and does
> minor changes while re-reading the code.

This patch no longer applies: http://cfbot.cputube.org/patch_27_2091.log

CF entry has been updated to Waiting on Author.

Regards,
--
-David
david(at)pgmasters(dot)net

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Steele 2020-03-24 15:08:01 Re: extension patch of CREATE OR REPLACE TRIGGER
Previous Message David Steele 2020-03-24 14:58:21 Re: [patch]socket_timeout in interfaces/libpq