From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: 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 13:43:25 -0300
Message-ID: <201901101643.njjahixaycmn@alvherre.pgsql> (raw)
In-Reply-To: <alpine.DEB.2.21.1901100923110.13058@lancre>
On 2019-Jan-10, Fabien COELHO wrote:
> However, I switched "pg_free" to "termPQExpBuffer", which seems more
> appropriate, even if it just does the same thing. I also ensured that
> prefixes are allocated & freed. I've commented about expr which is not
> freed.
Oops, of course, thanks.
> I'm not keen on having the command array size checked and updated *after*
> the command is appended, even if the initial allocation ensures that there
> is no overflow, but I let it as is.
It was already done that way, only it was done in two places rather than
one. I just refactored it. (In fairness, I think the assignment of the
new command to the array could also be done in one place instead of two,
but it seems slightly clearer like this.)
> Attached a v29 with the above minor changes wrt your version.
Thanks, pushed. I fixed a couple of very minor issues in the docs.
Now let's see how the buildfarm likes this ...
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
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: 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: <201901101643.njjahixaycmn@alvherre.pgsql>
* 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