diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2022-03-24 18:02:27 +0100 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2022-03-24 18:02:27 +0100 |
commit | e27f4ee0a701854daf16ac1d044f20d28a17053e (patch) | |
tree | 433036a4ca934feb90651ce134ab36ec66a9c926 /src/backend | |
parent | 0bd7af082ace135581bb13a6bd2d88e68c66a3e0 (diff) | |
download | postgresql-e27f4ee0a701854daf16ac1d044f20d28a17053e.tar.gz postgresql-e27f4ee0a701854daf16ac1d044f20d28a17053e.zip |
Change fastgetattr and heap_getattr to inline functions
They were macros previously, but recent callsite additions made Coverity
complain about one of the assertions being always true. This change
could have been made a long time ago, but the Coverity complain broke
the inertia.
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Reviewed-by: Japin Li <japinli@hotmail.com>
Reviewed-by: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Discussion: https://postgr.es/m/202203241021.uts52sczx3al@alvherre.pgsql
Diffstat (limited to 'src/backend')
-rw-r--r-- | src/backend/access/heap/heapam.c | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/src/backend/access/heap/heapam.c b/src/backend/access/heap/heapam.c index 3746336a09d..74ad445e59b 100644 --- a/src/backend/access/heap/heapam.c +++ b/src/backend/access/heap/heapam.c @@ -1131,52 +1131,6 @@ heapgettup_pagemode(HeapScanDesc scan, } -#if defined(DISABLE_COMPLEX_MACRO) -/* - * This is formatted so oddly so that the correspondence to the macro - * definition in access/htup_details.h is maintained. - */ -Datum -fastgetattr(HeapTuple tup, int attnum, TupleDesc tupleDesc, - bool *isnull) -{ - return ( - (attnum) > 0 ? - ( - (*(isnull) = false), - HeapTupleNoNulls(tup) ? - ( - TupleDescAttr((tupleDesc), (attnum) - 1)->attcacheoff >= 0 ? - ( - fetchatt(TupleDescAttr((tupleDesc), (attnum) - 1), - (char *) (tup)->t_data + (tup)->t_data->t_hoff + - TupleDescAttr((tupleDesc), (attnum) - 1)->attcacheoff) - ) - : - nocachegetattr((tup), (attnum), (tupleDesc)) - ) - : - ( - att_isnull((attnum) - 1, (tup)->t_data->t_bits) ? - ( - (*(isnull) = true), - (Datum) NULL - ) - : - ( - nocachegetattr((tup), (attnum), (tupleDesc)) - ) - ) - ) - : - ( - (Datum) NULL - ) - ); -} -#endif /* defined(DISABLE_COMPLEX_MACRO) */ - - /* ---------------------------------------------------------------- * heap access method interface * ---------------------------------------------------------------- |