Re: pgbench - refactor init functions with buffers

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: David Steele <david(at)pgmasters(dot)net>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Jeevan Ladhe <jeevan(dot)ladhe(at)enterprisedb(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pgbench - refactor init functions with buffers
Date: 2020-03-27 22:13:32
Message-ID: alpine.DEB.2.21.2003272259470.16227@pseudo
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


Hello David,

>>> I'd prefer not to expand the use of pqexpbuffer in more places, and
>>> instead rather see this use StringInfo, now that's also available to
>>> frontend programs.
>>
>> Franckly, one or the other does not matter much to me.
>
> FWIW, I agree with Andres with regard to using StringInfo.

Ok. I find it strange to mix PQExpBuffer & StringInfo in the same file.

> Also, the changes to executeStatementExpect() and adding executeStatement()
> do not seem to fit in with the purpose of this patch.

Yep, that was in passing.

Attached a v6 which uses StringInfo, and the small refactoring as a
separate patch.

--
Fabien.

Attachment Content-Type Size
pgbench-buffer-6.patch text/x-diff 13.0 KB
pgbench-refactor-exec-1.patch text/x-diff 2.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2020-03-27 22:17:00 Re: backup manifests
Previous Message Ranier Vilela 2020-03-27 22:11:17 Possible copy and past error? (\usr\backend\commands\analyze.c)