| От | Tom Lane |
|---|---|
| Тема | Re: Fix for seg picksplit function |
| Дата | |
| Msg-id | 3633.1289401632@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Fix for seg picksplit function (Alexander Korotkov <aekorotkov@gmail.com>) |
| Список | pgsql-hackers |
Alexander Korotkov <aekorotkov@gmail.com> writes:
> On Wed, Nov 10, 2010 at 4:53 PM, Alexander Korotkov <aekorotkov@gmail.com>wrote:
>> Actually I can't understand the purpose of FirstOffsetNumber
>> and OffsetNumberNext macros.
> For example, if we assume, that OffsetNumberNext can do something other that
> just increment, that we shouldn't use it in loop on sortItems,
Right. Good style is to use FirstOffsetNumber/OffsetNumberNext if you
are walking through the items on a page. They should *not* be used when
you are just iterating over a local array. I'd go with "for (i = 0;
i < nitems; i++)" for the latter.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера