Re: pgbench - refactor init functions with buffers
Fabien COELHO <coelho@cri.ensmp.fr>
From: Fabien COELHO <coelho@cri.ensmp.fr>
To: David Steele <david@pgmasters.net>
Cc: Andres Freund <andres@anarazel.de>,
Jeevan Ladhe <jeevan.ladhe@enterprisedb.com>,
Dilip Kumar <dilipbalaut@gmail.com>,
PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Date: 2020-03-27T22:13:32Z
Lists: pgsql-hackers
Attachments
- pgbench-buffer-6.patch (text/x-diff) patch
- pgbench-refactor-exec-1.patch (text/x-diff) patch
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.
Commits
-
pgbench: Use PQExpBuffer to simplify code that constructs SQL.
- 9796f455c38e 14.0 landed
-
Make command order in test more sensible
- ad4b7aeb8443 13.0 cited