Re: pgbench - refactor init functions with buffers
От
Fabien COELHO
Тема
Re: pgbench - refactor init functions with buffers
Дата
Msg-id
alpine.DEB.2.21.1910240817210.32142@lancre
Ответ на
Re: pgbench - refactor init functions with buffers (Jeevan Ladhe)
Список
Дерево обсуждения
pgbench - refactor init functions with buffers Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench - refactor init functions with buffers Dilip Kumar <dilipbalaut@gmail.com>
Re: pgbench - refactor init functions with buffers Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench - refactor init functions with buffers Dilip Kumar <dilipbalaut@gmail.com>
Re: pgbench - refactor init functions with buffers Jeevan Ladhe <jeevan.ladhe@enterprisedb.com>
Re: pgbench - refactor init functions with buffers Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench - refactor init functions with buffers Jeevan Ladhe <jeevan.ladhe@enterprisedb.com>
Re: pgbench - refactor init functions with buffers Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench - refactor init functions with buffers Jeevan Ladhe <jeevan.ladhe@enterprisedb.com>
Re: pgbench - refactor init functions with buffers Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench - refactor init functions with buffers Andres Freund <andres@anarazel.de>
Re: pgbench - refactor init functions with buffers Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench - refactor init functions with buffers Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench - refactor init functions with buffers David Steele <david@pgmasters.net>
Re: pgbench - refactor init functions with buffers Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench - refactor init functions with buffers David Steele <david@pgmasters.net>
Re: pgbench - refactor init functions with buffers Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench - refactor init functions with buffers Tom Lane <tgl@sss.pgh.pa.us>
Re: pgbench - refactor init functions with buffers Alvaro Herrera <alvherre@2ndquadrant.com>
Re: pgbench - refactor init functions with buffers David Steele <david@pgmasters.net>
Re: pgbench - refactor init functions with buffers Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench - refactor init functions with buffers Heikki Linnakangas <hlinnaka@iki.fi>
Re: pgbench - refactor init functions with buffers Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench - refactor init functions with buffers Andres Freund <andres@anarazel.de>
Re: pgbench - refactor init functions with buffers Tom Lane <tgl@sss.pgh.pa.us>
Re: pgbench - refactor init functions with buffers Andres Freund <andres@anarazel.de>
Re: pgbench - refactor init functions with buffers Tom Lane <tgl@sss.pgh.pa.us>
Re: pgbench - refactor init functions with buffers Andres Freund <andres@anarazel.de>
Re: pgbench - refactor init functions with buffers Fabien COELHO <coelho@cri.ensmp.fr>
Re: pgbench - refactor init functions with buffers Fabien COELHO <coelho@cri.ensmp.fr>
Hello Jeevan,
> +static void
> +executeStatementExpect(PGconn *con, const char *sql, const ExecStatusType
> expected, bool errorOK)
> +{
>
> I think some instances like this need 80 column alignment?
Yep. Applying the pgindent is kind-of a pain, so I tend to do a reasonable
job by hand and rely on the next global pgindent to fix such things. I
shorten the line anyway.
> + resetPQExpBuffer(&query);
> + appendPQExpBufferStr(&query, DDLINDEXes[i]);
>
> I think you can simply use printfPQExpBuffer() for the first append,
> similar to what you have used in createPartitions(), which is a
> combination of both reset and append.
It could, but it would mean switching to using a format which is not very
useful here as it uses the simpler append*Str variant.
While looking at it, I noticed the repeated tablespace addition just
afterwards, so I factored it out as well in a function.
Attached v3 shorten some lines and adds "append_tablespace".
--
Fabien.В списке pgsql-hackers по дате отправления