Re: pgbench - add \aset to store results of a combined query - Mailing list pgsql-hackers

From Fabien COELHO
Subject Re: pgbench - add \aset to store results of a combined query
Date
Msg-id alpine.DEB.2.21.2004021437440.16227@pseudo
Whole thread Raw
In response to Re: pgbench - add \aset to store results of a combined query  (Michael Paquier <michael@paquier.xyz>)
Responses Re: pgbench - add \aset to store results of a combined query  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
Michaël,

>> ISTM that I submitted a patch to test whether a variable exists in pgbench,
>> like available in psql (:{?var} I think),
>
> Not sure if improving the readability of the tests is a reason for
> this patch.  So I would suggest to just live with relying on debug()
> for now to check that a variable with a given prefix exists.

Sure. I meant that the feature would make sense to write benchmark scripts 
which would use aset and be able to act on the success or not of this 
aset, not to resurrect it for a hidden coverage test.

> Thanks.  So, it looks like everything has been addressed.  Do you have
> anything else in mind?

Nope.

> NB: I think that it is really strange to not use an array for the
> options in subroutine pgbench() of 001_pgbench_with_server.pl.
> Shouldn't this be an array of options instead?  The current logic of
> using a splitted string is weak when it comes to option quoting in
> perl and command handling in general.

The idea is that a scalar is simpler and readable to write in the simple 
case than a perl array. Now maybe qw() could have done the trick.

-- 
Fabien.

pgsql-hackers by date:

Previous
From: Kashif Zeeshan
Date:
Subject: Re: WIP/PoC for parallel backup
Next
From: Robert Haas
Date:
Subject: Re: WIP/PoC for parallel backup