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

Commit 7044dd7

Browse files
committed
Fix heap_getattr bug I just added.
1 parent 4379ce8 commit 7044dd7

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/include/access/heapam.h

Lines changed: 8 additions & 7 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.17 1997/09/12 05:58:18 momjian Exp $
9+
* $Id: heapam.h,v 1.18 1997/09/12 14:29:04 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -95,12 +95,13 @@ typedef HeapAccessStatisticsData *HeapAccessStatistics;
9595
* pointer to the structure describing the row and all its fields.
9696
* ---------------- */
9797
#define heap_getattr(tup, b, attnum, tupleDesc, isnull) \
98-
(AssertMacro((tup) != NULL) && \
99-
((attnum) > (int) (tup)->t_natts) ? \
100-
((isnull && (*(isnull) = true)), (Datum)NULL) : \
101-
((attnum) > 0) ? \
102-
fastgetattr((tup), (attnum), (tupleDesc), (isnull)) : \
103-
((isnull && (*(isnull) = false)), heap_getsysattr((tup), (b), (attnum))))
98+
(AssertMacro((tup) != NULL) ? \
99+
((attnum) > (int) (tup)->t_natts) ? \
100+
(((isnull) ? (*(isnull) = true) : (char)NULL), (Datum)NULL) : \
101+
((attnum) > 0) ? \
102+
fastgetattr((tup), (attnum), (tupleDesc), (isnull)) : \
103+
(((isnull) ? (*(isnull) = false) : (char)NULL), heap_getsysattr((tup), (b), (attnum))) : \
104+
(Datum)NULL)
104105

105106
extern HeapAccessStatistics heap_access_stats; /* in stats.c */
106107

0 commit comments

Comments
 (0)