gist picksplit iteration

From: Marios Vodas <mvodas(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: gist picksplit iteration
Date: 2010-10-05 11:21:34
Message-ID: AANLkTinCCVaiGAYr3Y13nukBJxu_zaVKqkTu2BsLX0b8@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At this page in documentation
http://www.postgresql.org/docs/9.0/static/gist-implementation.html and under
"picksplit" the loop that iterates through entryvec->vector[] starts from 1
(since FirstOffsetNumber equals 1).
for (i = FirstOffsetNumber; i <= maxoff; i = OffsetNumberNext(i))

I would expect it to start from 0, since C arrays are 0 based.
So my question is why does this happen?

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2010-10-05 11:25:07 Re: is sync rep stalled?
Previous Message Rajesh Kumar Mallah 2010-10-05 10:16:09 Re: streaming replication question