Hello Jeevan,
>> I haven't read the complete patch. But, I have noticed that many
>> places you changed the variable declaration from c to c++ style (i.e
>> moved the declaration in the for loop). IMHO, generally in PG, we
>> don't follow this convention. Is there any specific reason to do
>> this?
>
> +1.
As I said, this C99 feature is already used extensively in pg sources, so
it makes sense to use it when refactoring something and if appropriate,
which IMO is the case here.
Ok, no problem.
> The patch does not apply on master, needs rebase.
Hmmm. "git apply pgbench-buffer-1.patch" works for me on current master.
> Also, I got some whitespace errors.
It possible, but I cannot see any. Could you be more specific?
For me it failing, see below:
$ git log -1
commit ad4b7aeb84434c958e2df76fa69b68493a889e4a
Date: Tue Oct 22 10:35:54 2019 +0200
Make command order in test more sensible
Through several updates, the CREATE USER command has been separated
from where the user is actually used in the test.
$ git apply pgbench-buffer-1.patch
pgbench-buffer-1.patch:10: trailing whitespace.
static void append_fillfactor(PQExpBuffer query);
pgbench-buffer-1.patch:18: trailing whitespace.
executeStatementExpect(PGconn *con, const char *sql, const ExecStatusType expected)
pgbench-buffer-1.patch:19: trailing whitespace.
{
pgbench-buffer-1.patch:20: trailing whitespace.
PGresult *res;
pgbench-buffer-1.patch:21: trailing whitespace.
error: patch failed: src/bin/pgbench/pgbench.c:599
error: src/bin/pgbench/pgbench.c: patch does not apply
$
Regards,
Jeevan Ladhe