Skip to content

Commit 88e9482

Browse files
committed
Nest macros with slightly less enthusiasm, for performance and to avoid
having non-gcc compilers spit up.
1 parent 2a6f7ac commit 88e9482

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/backend/access/gist/gist.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/access/gist/gist.c,v 1.78 2001/05/31 18:16:54 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/access/gist/gist.c,v 1.79 2001/06/11 05:00:56 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -1370,8 +1370,10 @@ gistchoose(Relation r, Page p, IndexTuple it, /* it has compressed entry */
13701370
for (i = FirstOffsetNumber; i <= maxoff && sum_grow; i = OffsetNumberNext(i))
13711371
{
13721372
sum_grow=0;
1373-
for( j=0; j<r->rd_att->natts; j++ ) {
1374-
datum = index_getattr( (IndexTuple)PageGetItem(p, PageGetItemId(p, i)), j+1, r->rd_att, &IsNull);
1373+
for (j=0; j<r->rd_att->natts; j++) {
1374+
IndexTuple itup = (IndexTuple) PageGetItem(p, PageGetItemId(p, i));
1375+
1376+
datum = index_getattr(itup, j+1, r->rd_att, &IsNull);
13751377
gistdentryinit(giststate, j, &entry, datum, r, p, i, ATTSIZE( datum, r, j+1, IsNull ), FALSE);
13761378
FunctionCall3(&giststate->penaltyFn[j],
13771379
PointerGetDatum(&entry),

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy