Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit ec9d5d7

Browse files
committed
Update now that attcacheoff initial value is -1 always.
1 parent 6009d70 commit ec9d5d7

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

src/backend/access/common/heaptuple.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.34 1998/02/05 15:08:49 scrappy Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.35 1998/02/06 20:17:49 momjian Exp $
1212
*
1313
* NOTES
1414
* The old interface functions have been converted to macros
@@ -428,7 +428,7 @@ nocachegetattr(HeapTuple tup,
428428

429429
#if IN_MACRO
430430
/* This is handled in the macro */
431-
if (att[attnum]->attcacheoff > 0)
431+
if (att[attnum]->attcacheoff != -1)
432432
{
433433
return (Datum)
434434
fetchatt(&(att[attnum]),
@@ -512,7 +512,7 @@ nocachegetattr(HeapTuple tup,
512512
*/
513513
if (!slow)
514514
{
515-
if (att[attnum]->attcacheoff > 0)
515+
if (att[attnum]->attcacheoff != -1)
516516
{
517517
return (Datum)fetchatt(&(att[attnum]),
518518
tp + att[attnum]->attcacheoff);
@@ -650,7 +650,7 @@ nocachegetattr(HeapTuple tup,
650650
}
651651

652652
/* If we know the next offset, we can skip the rest */
653-
if (usecache && att[i]->attcacheoff > 0)
653+
if (usecache && att[i]->attcacheoff != -1)
654654
off = att[i]->attcacheoff;
655655
else
656656
{

src/backend/access/common/indextuple.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.25 1998/02/05 17:22:23 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.26 1998/02/06 20:17:51 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -181,7 +181,7 @@ nocache_index_getattr(IndexTuple tup,
181181
{
182182
return (Datum) fetchatt(&(att[0]), (char *) tup + data_off);
183183
}
184-
if (att[attnum]->attcacheoff > 0)
184+
if (att[attnum]->attcacheoff != -1)
185185
{
186186
return (Datum) fetchatt(&(att[attnum]),
187187
(char *) tup + data_off +
@@ -254,7 +254,7 @@ nocache_index_getattr(IndexTuple tup,
254254

255255
if (!slow)
256256
{
257-
if (att[attnum]->attcacheoff > 0)
257+
if (att[attnum]->attcacheoff != -1)
258258
{
259259
return (Datum) fetchatt(&(att[attnum]),
260260
tp + att[attnum]->attcacheoff);
@@ -290,7 +290,7 @@ nocache_index_getattr(IndexTuple tup,
290290

291291
att[0]->attcacheoff = 0;
292292

293-
while (att[j]->attcacheoff > 0)
293+
while (att[j]->attcacheoff != -1)
294294
j++;
295295

296296
if (!VARLENA_FIXED_SIZE(att[j-1]))
@@ -366,7 +366,7 @@ nocache_index_getattr(IndexTuple tup,
366366
}
367367

368368
/* If we know the next offset, we can skip the rest */
369-
if (usecache && att[i]->attcacheoff > 0)
369+
if (usecache && att[i]->attcacheoff != -1)
370370
off = att[i]->attcacheoff;
371371
else
372372
{

src/include/access/heapam.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: heapam.h,v 1.28 1998/02/01 05:38:38 momjian Exp $
9+
* $Id: heapam.h,v 1.29 1998/02/06 20:18:00 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -95,7 +95,7 @@ typedef HeapAccessStatisticsData *HeapAccessStatistics;
9595
((isnull) ? (*(isnull) = false) : (dummyret)NULL), \
9696
HeapTupleNoNulls(tup) ? \
9797
( \
98-
((tupleDesc)->attrs[(attnum)-1]->attcacheoff > 0 || \
98+
((tupleDesc)->attrs[(attnum)-1]->attcacheoff != -1 || \
9999
(attnum) == 1) ? \
100100
( \
101101
(Datum)fetchatt(&((tupleDesc)->attrs[(attnum)-1]), \

src/include/access/itup.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: itup.h,v 1.11 1998/02/01 05:38:39 momjian Exp $
9+
* $Id: itup.h,v 1.12 1998/02/06 20:18:01 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -123,7 +123,7 @@ typedef struct PredInfo
123123
*(isnull) = false, \
124124
IndexTupleNoNulls(tup) ? \
125125
( \
126-
((tupleDesc)->attrs[(attnum)-1]->attcacheoff > 0 || \
126+
((tupleDesc)->attrs[(attnum)-1]->attcacheoff != -1 || \
127127
(attnum) == 1) ? \
128128
( \
129129
(Datum)fetchatt(&((tupleDesc)->attrs[(attnum)-1]), \

0 commit comments

Comments
 (0)