mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-12 18:34:36 +08:00
This is the patch replace offnum++ by OffsetNumberNext, to be
consistent. OffsetNumberNext() has some casting that makes it useful. Fujii Masao
This commit is contained in:
parent
a61b2464fa
commit
d82a1d582c
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/access/heap/pruneheap.c,v 1.11 2008/05/12 16:06:09 alvherre Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/access/heap/pruneheap.c,v 1.12 2008/05/13 15:44:08 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -792,7 +792,7 @@ heap_get_root_tuples(Page page, OffsetNumber *root_offsets)
|
||||
MemSet(root_offsets, 0, MaxHeapTuplesPerPage * sizeof(OffsetNumber));
|
||||
|
||||
maxoff = PageGetMaxOffsetNumber(page);
|
||||
for (offnum = FirstOffsetNumber; offnum <= maxoff; offnum++)
|
||||
for (offnum = FirstOffsetNumber; offnum <= maxoff; offnum = OffsetNumberNext(offnum))
|
||||
{
|
||||
ItemId lp = PageGetItemId(page, offnum);
|
||||
HeapTupleHeader htup;
|
||||
|
@ -21,7 +21,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/executor/nodeBitmapHeapscan.c,v 1.27 2008/05/12 00:00:49 alvherre Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/executor/nodeBitmapHeapscan.c,v 1.28 2008/05/13 15:44:08 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -302,7 +302,7 @@ bitgetpage(HeapScanDesc scan, TBMIterateResult *tbmres)
|
||||
OffsetNumber maxoff = PageGetMaxOffsetNumber(dp);
|
||||
OffsetNumber offnum;
|
||||
|
||||
for (offnum = FirstOffsetNumber; offnum <= maxoff; offnum++)
|
||||
for (offnum = FirstOffsetNumber; offnum <= maxoff; offnum = OffsetNumberNext(offnum))
|
||||
{
|
||||
ItemId lp;
|
||||
HeapTupleData loctup;
|
||||
|
@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/storage/page/bufpage.c,v 1.78 2008/02/10 20:39:08 tgl Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/storage/page/bufpage.c,v 1.79 2008/05/13 15:44:08 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -533,7 +533,7 @@ PageGetHeapFreeSpace(Page page)
|
||||
* Since this is just a hint, we must confirm that there is
|
||||
* indeed a free line pointer
|
||||
*/
|
||||
for (offnum = FirstOffsetNumber; offnum <= nline; offnum++)
|
||||
for (offnum = FirstOffsetNumber; offnum <= nline; offnum = OffsetNumberNext(offnum))
|
||||
{
|
||||
ItemId lp = PageGetItemId(page, offnum);
|
||||
|
||||
@ -736,7 +736,7 @@ PageIndexMultiDelete(Page page, OffsetNumber *itemnos, int nitems)
|
||||
totallen = 0;
|
||||
nused = 0;
|
||||
nextitm = 0;
|
||||
for (offnum = 1; offnum <= nline; offnum++)
|
||||
for (offnum = FirstOffsetNumber; offnum <= nline; offnum = OffsetNumberNext(offnum))
|
||||
{
|
||||
lp = PageGetItemId(page, offnum);
|
||||
Assert(ItemIdHasStorage(lp));
|
||||
|
Loading…
Reference in New Issue
Block a user