]> granicus.if.org Git - postgresql/commitdiff
Fix heap_getattr bug I just added.
authorBruce Momjian <bruce@momjian.us>
Fri, 12 Sep 1997 14:29:04 +0000 (14:29 +0000)
committerBruce Momjian <bruce@momjian.us>
Fri, 12 Sep 1997 14:29:04 +0000 (14:29 +0000)
src/include/access/heapam.h

index b0089161ec3f56a8866344c93f14ac476fb0a45a..c5759c6e7666ac7fc8199683120fc2e58da599db 100644 (file)
@@ -6,7 +6,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: heapam.h,v 1.17 1997/09/12 05:58:18 momjian Exp $
+ * $Id: heapam.h,v 1.18 1997/09/12 14:29:04 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -95,12 +95,13 @@ typedef HeapAccessStatisticsData *HeapAccessStatistics;
  *             pointer to the structure describing the row and all its fields.
  * ---------------- */
 #define heap_getattr(tup, b, attnum, tupleDesc, isnull) \
-       (AssertMacro((tup) != NULL) && \
-       ((attnum) > (int) (tup)->t_natts) ? \
-               ((isnull && (*(isnull) = true)), (Datum)NULL) : \
-       ((attnum) > 0) ? \
-               fastgetattr((tup), (attnum), (tupleDesc), (isnull)) : \
-       ((isnull && (*(isnull) = false)), heap_getsysattr((tup), (b), (attnum))))
+       (AssertMacro((tup) != NULL) ? \
+               ((attnum) > (int) (tup)->t_natts) ? \
+                       (((isnull) ? (*(isnull) = true) : (char)NULL), (Datum)NULL) : \
+               ((attnum) > 0) ? \
+                       fastgetattr((tup), (attnum), (tupleDesc), (isnull)) : \
+               (((isnull) ? (*(isnull) = false) : (char)NULL), heap_getsysattr((tup), (b), (attnum))) : \
+       (Datum)NULL)
 
 extern HeapAccessStatistics heap_access_stats; /* in stats.c */