Alexander Korotkov <aekorot...@gmail.com> writes:
> On Wed, Nov 10, 2010 at 4:53 PM, Alexander Korotkov 
> <aekorot...@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

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to