mirror of
https://github.com/postgres/postgres.git
synced 2025-07-03 20:02:46 +03:00
Code cleanup. gistfillbuffer accepts InvalidOffsetNumber.
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $PostgreSQL: pgsql/src/backend/access/gist/gistutil.c,v 1.3 2005/06/27 12:45:22 teodor Exp $
|
||||
* $PostgreSQL: pgsql/src/backend/access/gist/gistutil.c,v 1.4 2005/06/28 15:51:00 teodor Exp $
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
#include "postgres.h"
|
||||
@ -62,6 +62,10 @@ gistfillbuffer(Relation r, Page page, IndexTuple *itup,
|
||||
OffsetNumber l = InvalidOffsetNumber;
|
||||
int i;
|
||||
|
||||
if ( off == InvalidOffsetNumber )
|
||||
off = ( PageIsEmpty(page) ) ? FirstOffsetNumber :
|
||||
OffsetNumberNext(PageGetMaxOffsetNumber(page));
|
||||
|
||||
for (i = 0; i < len; i++)
|
||||
{
|
||||
l = PageAddItem(page, (Item) itup[i], IndexTupleSize(itup[i]),
|
||||
|
Reference in New Issue
Block a user