1 /*-------------------------------------------------------------------------
4 * POSTGRES tuple qualification validity definitions.
7 * Portions Copyright (c) 1996-2021, PostgreSQL Global Development Group
8 * Portions Copyright (c) 1994, Regents of the University of California
10 * src/include/access/valid.h
12 *-------------------------------------------------------------------------
20 * Test a heap tuple to see if it satisfies a scan key.
22 #define HeapKeyTest(tuple, \
29 /* Use underscores to protect the variables passed in as parameters */ \
30 int __cur_nkeys = (nkeys); \
31 ScanKey __cur_keys = (keys); \
33 (result) = true; /* may change */ \
34 for (; __cur_nkeys--; __cur_keys++) \
40 if (__cur_keys->sk_flags & SK_ISNULL) \
46 __atp = heap_getattr((tuple), \
47 __cur_keys->sk_attno, \
57 __test = FunctionCall2Coll(&__cur_keys->sk_func, \
58 __cur_keys->sk_collation, \
59 __atp, __cur_keys->sk_argument); \
61 if (!DatumGetBool(__test)) \