提交 ec9d5d71 编写于 作者: B Bruce Momjian

Update now that attcacheoff initial value is -1 always.

上级 6009d70e
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.34 1998/02/05 15:08:49 scrappy Exp $ * $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.35 1998/02/06 20:17:49 momjian Exp $
* *
* NOTES * NOTES
* The old interface functions have been converted to macros * The old interface functions have been converted to macros
...@@ -428,7 +428,7 @@ nocachegetattr(HeapTuple tup, ...@@ -428,7 +428,7 @@ nocachegetattr(HeapTuple tup,
#if IN_MACRO #if IN_MACRO
/* This is handled in the macro */ /* This is handled in the macro */
if (att[attnum]->attcacheoff > 0) if (att[attnum]->attcacheoff != -1)
{ {
return (Datum) return (Datum)
fetchatt(&(att[attnum]), fetchatt(&(att[attnum]),
...@@ -512,7 +512,7 @@ nocachegetattr(HeapTuple tup, ...@@ -512,7 +512,7 @@ nocachegetattr(HeapTuple tup,
*/ */
if (!slow) if (!slow)
{ {
if (att[attnum]->attcacheoff > 0) if (att[attnum]->attcacheoff != -1)
{ {
return (Datum)fetchatt(&(att[attnum]), return (Datum)fetchatt(&(att[attnum]),
tp + att[attnum]->attcacheoff); tp + att[attnum]->attcacheoff);
...@@ -650,7 +650,7 @@ nocachegetattr(HeapTuple tup, ...@@ -650,7 +650,7 @@ nocachegetattr(HeapTuple tup,
} }
/* If we know the next offset, we can skip the rest */ /* If we know the next offset, we can skip the rest */
if (usecache && att[i]->attcacheoff > 0) if (usecache && att[i]->attcacheoff != -1)
off = att[i]->attcacheoff; off = att[i]->attcacheoff;
else else
{ {
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.25 1998/02/05 17:22:23 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.26 1998/02/06 20:17:51 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -181,7 +181,7 @@ nocache_index_getattr(IndexTuple tup, ...@@ -181,7 +181,7 @@ nocache_index_getattr(IndexTuple tup,
{ {
return (Datum) fetchatt(&(att[0]), (char *) tup + data_off); return (Datum) fetchatt(&(att[0]), (char *) tup + data_off);
} }
if (att[attnum]->attcacheoff > 0) if (att[attnum]->attcacheoff != -1)
{ {
return (Datum) fetchatt(&(att[attnum]), return (Datum) fetchatt(&(att[attnum]),
(char *) tup + data_off + (char *) tup + data_off +
...@@ -254,7 +254,7 @@ nocache_index_getattr(IndexTuple tup, ...@@ -254,7 +254,7 @@ nocache_index_getattr(IndexTuple tup,
if (!slow) if (!slow)
{ {
if (att[attnum]->attcacheoff > 0) if (att[attnum]->attcacheoff != -1)
{ {
return (Datum) fetchatt(&(att[attnum]), return (Datum) fetchatt(&(att[attnum]),
tp + att[attnum]->attcacheoff); tp + att[attnum]->attcacheoff);
...@@ -290,7 +290,7 @@ nocache_index_getattr(IndexTuple tup, ...@@ -290,7 +290,7 @@ nocache_index_getattr(IndexTuple tup,
att[0]->attcacheoff = 0; att[0]->attcacheoff = 0;
while (att[j]->attcacheoff > 0) while (att[j]->attcacheoff != -1)
j++; j++;
if (!VARLENA_FIXED_SIZE(att[j-1])) if (!VARLENA_FIXED_SIZE(att[j-1]))
...@@ -366,7 +366,7 @@ nocache_index_getattr(IndexTuple tup, ...@@ -366,7 +366,7 @@ nocache_index_getattr(IndexTuple tup,
} }
/* If we know the next offset, we can skip the rest */ /* If we know the next offset, we can skip the rest */
if (usecache && att[i]->attcacheoff > 0) if (usecache && att[i]->attcacheoff != -1)
off = att[i]->attcacheoff; off = att[i]->attcacheoff;
else else
{ {
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* *
* Copyright (c) 1994, Regents of the University of California * Copyright (c) 1994, Regents of the University of California
* *
* $Id: heapam.h,v 1.28 1998/02/01 05:38:38 momjian Exp $ * $Id: heapam.h,v 1.29 1998/02/06 20:18:00 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -95,7 +95,7 @@ typedef HeapAccessStatisticsData *HeapAccessStatistics; ...@@ -95,7 +95,7 @@ typedef HeapAccessStatisticsData *HeapAccessStatistics;
((isnull) ? (*(isnull) = false) : (dummyret)NULL), \ ((isnull) ? (*(isnull) = false) : (dummyret)NULL), \
HeapTupleNoNulls(tup) ? \ HeapTupleNoNulls(tup) ? \
( \ ( \
((tupleDesc)->attrs[(attnum)-1]->attcacheoff > 0 || \ ((tupleDesc)->attrs[(attnum)-1]->attcacheoff != -1 || \
(attnum) == 1) ? \ (attnum) == 1) ? \
( \ ( \
(Datum)fetchatt(&((tupleDesc)->attrs[(attnum)-1]), \ (Datum)fetchatt(&((tupleDesc)->attrs[(attnum)-1]), \
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* *
* Copyright (c) 1994, Regents of the University of California * Copyright (c) 1994, Regents of the University of California
* *
* $Id: itup.h,v 1.11 1998/02/01 05:38:39 momjian Exp $ * $Id: itup.h,v 1.12 1998/02/06 20:18:01 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -123,7 +123,7 @@ typedef struct PredInfo ...@@ -123,7 +123,7 @@ typedef struct PredInfo
*(isnull) = false, \ *(isnull) = false, \
IndexTupleNoNulls(tup) ? \ IndexTupleNoNulls(tup) ? \
( \ ( \
((tupleDesc)->attrs[(attnum)-1]->attcacheoff > 0 || \ ((tupleDesc)->attrs[(attnum)-1]->attcacheoff != -1 || \
(attnum) == 1) ? \ (attnum) == 1) ? \
( \ ( \
(Datum)fetchatt(&((tupleDesc)->attrs[(attnum)-1]), \ (Datum)fetchatt(&((tupleDesc)->attrs[(attnum)-1]), \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册