Re: pgbench - refactor init functions with buffers

Поиск
Список
Период
Сортировка
Искать
От
Fabien COELHO
Тема
Re: pgbench - refactor init functions with buffers
Дата
Msg-id
alpine.DEB.2.21.1910221155310.15559@lancre
Ответ на
Список
Дерево обсуждения
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 Dilip,

> - for (i = 0; i < nbranches * scale; i++)
> + for (int i = 0; i < nbranches * scale; i++)
> ...
> - for (i = 0; i < ntellers * scale; i++)
> + for (int i = 0; i < ntellers * scale; i++)
>  {
>
> 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?

There are many places where it is used now in pg (120 occurrences in 
master, 7 in pgbench). I had a bug recently because of a stupidly reused 
index variable, so I tend to use this now it is admissible, moreover here 
I'm actually doing a refactoring patch, so it seems ok to include that.

-- 
Fabien.


В списке pgsql-hackers по дате отправления
От: Devrim Gündüz
Дата:
От: Amit Kapila
Дата:
FAQ