1
0
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:
Teodor Sigaev
2005-06-28 15:51:00 +00:00
parent 365205dd2a
commit 88b49cdc95
4 changed files with 16 additions and 30 deletions

View File

@ -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]),