aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>1998-02-01 05:38:40 +0000
committerBruce Momjian <bruce@momjian.us>1998-02-01 05:38:40 +0000
commitd8ddb10f51603b9d65ae756c647788ba204ddd8d (patch)
tree79f8e68c0a65d790791fe57ad56147bf63921ca2
parent1af818b8bfc9127167ac7058c2c625b07f12271a (diff)
downloadpostgresql-d8ddb10f51603b9d65ae756c647788ba204ddd8d.tar.gz
postgresql-d8ddb10f51603b9d65ae756c647788ba204ddd8d.zip
Reduce size of inlining.
-rw-r--r--src/include/access/heapam.h25
-rw-r--r--src/include/access/itup.h37
-rw-r--r--src/include/access/tupmacs.h26
3 files changed, 48 insertions, 40 deletions
diff --git a/src/include/access/heapam.h b/src/include/access/heapam.h
index 4e5fe7ca5b7..0b7fb5e373f 100644
--- a/src/include/access/heapam.h
+++ b/src/include/access/heapam.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: heapam.h,v 1.27 1998/01/31 04:39:21 momjian Exp $
+ * $Id: heapam.h,v 1.28 1998/02/01 05:38:38 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -95,22 +95,21 @@ typedef HeapAccessStatisticsData *HeapAccessStatistics;
((isnull) ? (*(isnull) = false) : (dummyret)NULL), \
HeapTupleNoNulls(tup) ? \
( \
- ((tupleDesc)->attrs[(attnum)-1]->attcacheoff > 0) ? \
+ ((tupleDesc)->attrs[(attnum)-1]->attcacheoff > 0 || \
+ (attnum) == 1) ? \
( \
(Datum)fetchatt(&((tupleDesc)->attrs[(attnum)-1]), \
- (char *) (tup) + (tup)->t_hoff + (tupleDesc)->attrs[(attnum)-1]->attcacheoff) \
- ) \
- : \
- ( \
- ((attnum)-1 == 0) ? \
- ( \
- (Datum)fetchatt(&((tupleDesc)->attrs[0]), (char *) (tup) + (tup)->t_hoff) \
- ) \
- : \
- ( \
- nocachegetattr((tup), (attnum), (tupleDesc), (isnull)) \
+ (char *) (tup) + (tup)->t_hoff + \
+ ( \
+ ((attnum) != 1) ? \
+ (tupleDesc)->attrs[(attnum)-1]->attcacheoff \
+ : \
+ 0 \
+ ) \
) \
) \
+ : \
+ nocachegetattr((tup), (attnum), (tupleDesc), (isnull)) \
) \
: \
( \
diff --git a/src/include/access/itup.h b/src/include/access/itup.h
index 1ace51fa44f..5b80a6f320f 100644
--- a/src/include/access/itup.h
+++ b/src/include/access/itup.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: itup.h,v 1.10 1998/01/31 04:39:23 momjian Exp $
+ * $Id: itup.h,v 1.11 1998/02/01 05:38:39 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -123,28 +123,27 @@ typedef struct PredInfo
*(isnull) = false, \
IndexTupleNoNulls(tup) ? \
( \
- ((tupleDesc)->attrs[(attnum)-1]->attcacheoff > 0) ? \
+ ((tupleDesc)->attrs[(attnum)-1]->attcacheoff > 0 || \
+ (attnum) == 1) ? \
( \
(Datum)fetchatt(&((tupleDesc)->attrs[(attnum)-1]), \
- (char *) (tup) + \
- (IndexTupleHasMinHeader(tup) ? sizeof (*(tup)) : \
- IndexInfoFindDataOffset((tup)->t_info)) + \
- (tupleDesc)->attrs[(attnum)-1]->attcacheoff) \
- ) \
- : \
- ( \
- ((attnum)-1 == 0) ? \
- ( \
- (Datum)fetchatt(&((tupleDesc)->attrs[0]), \
- (char *) (tup) + \
- (IndexTupleHasMinHeader(tup) ? sizeof (*(tup)) : \
- IndexInfoFindDataOffset((tup)->t_info))) \
- ) \
- : \
- ( \
- nocache_index_getattr((tup), (attnum), (tupleDesc), (isnull)) \
+ (char *) (tup) + \
+ ( \
+ IndexTupleHasMinHeader(tup) ? \
+ sizeof (*(tup)) \
+ : \
+ IndexInfoFindDataOffset((tup)->t_info) \
+ ) + \
+ ( \
+ ((attnum) != 1) ? \
+ (tupleDesc)->attrs[(attnum)-1]->attcacheoff \
+ : \
+ 0 \
+ ) \
) \
) \
+ : \
+ nocache_index_getattr((tup), (attnum), (tupleDesc), (isnull)) \
) \
: \
( \
diff --git a/src/include/access/tupmacs.h b/src/include/access/tupmacs.h
index 39d3004d561..c7711f5333a 100644
--- a/src/include/access/tupmacs.h
+++ b/src/include/access/tupmacs.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: tupmacs.h,v 1.2 1997/09/07 04:56:17 momjian Exp $
+ * $Id: tupmacs.h,v 1.3 1998/02/01 05:38:40 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -44,12 +44,22 @@
* I would eliminate attbyval altogether, but I don't know how. -BRYANH.
*/
#define fetchatt(A, T) \
- ((*(A))->attbyval && (*(A))->attlen != -1 \
- ? ((*(A))->attlen > sizeof(int16) \
- ? (char *) (long) *((int32 *)(T)) \
- : ((*(A))->attlen < sizeof(int16) \
- ? (char *) (long) *((char *)(T)) \
- : (char *) (long) *((int16 *)(T)))) \
- : (char *) (T))
+( \
+ (*(A))->attbyval && (*(A))->attlen != -1 ? \
+ ( \
+ (*(A))->attlen > sizeof(int16) ? \
+ ( \
+ (char *) (long) *((int32 *)(T)) \
+ ) \
+ : \
+ ( \
+ (*(A))->attlen < sizeof(int16) ? \
+ (char *) (long) *((char *)(T)) \
+ : \
+ (char *) (long) *((int16 *)(T))) \
+ ) \
+ : \
+ (char *) (T) \
+)
#endif