Go to the source code of this file.
Defines | |
#define | att_isnull(ATT, BITS) (!((BITS)[(ATT) >> 3] & (1 << ((ATT) & 0x07)))) |
#define | fetchatt(A, T) fetch_att(T, (A)->attbyval, (A)->attlen) |
#define | fetch_att(T, attbyval, attlen) |
#define | att_align_datum(cur_offset, attalign, attlen, attdatum) |
#define | att_align_pointer(cur_offset, attalign, attlen, attptr) |
#define | att_align_nominal(cur_offset, attalign) |
#define | att_addlength_datum(cur_offset, attlen, attdatum) att_addlength_pointer(cur_offset, attlen, DatumGetPointer(attdatum)) |
#define | att_addlength_pointer(cur_offset, attlen, attptr) |
#define | store_att_byval(T, newdatum, attlen) |
#define att_addlength_datum | ( | cur_offset, | ||
attlen, | ||||
attdatum | ||||
) | att_addlength_pointer(cur_offset, attlen, DatumGetPointer(attdatum)) |
Definition at line 160 of file tupmacs.h.
Referenced by array_fill_internal(), array_map(), array_replace_internal(), array_set(), ArrayCastAndSet(), construct_md_array(), datum_compute_size(), heap_compute_data_size(), ReadArrayBinary(), and ReadArrayStr().
#define att_addlength_pointer | ( | cur_offset, | ||
attlen, | ||||
attptr | ||||
) |
( \ ((attlen) > 0) ? \ ( \ (cur_offset) + (attlen) \ ) \ : (((attlen) == -1) ? \ ( \ (cur_offset) + VARSIZE_ANY(attptr) \ ) \ : \ ( \ AssertMacro((attlen) == -2), \ (cur_offset) + (strlen((char *) (attptr)) + 1) \ )) \ )
Definition at line 172 of file tupmacs.h.
Referenced by array_cmp(), array_contain_compare(), array_eq(), array_iterate(), array_out(), array_seek(), array_send(), array_set(), array_slice_size(), array_to_text_internal(), array_unnest(), deconstruct_array(), ExecEvalScalarArrayOp(), get_text_array_contents(), hash_array(), heap_deform_tuple(), nocache_index_getattr(), nocachegetattr(), range_deserialize(), and slot_deform_tuple().
#define att_align_datum | ( | cur_offset, | ||
attalign, | ||||
attlen, | ||||
attdatum | ||||
) |
( \ ((attlen) == -1 && VARATT_IS_SHORT(DatumGetPointer(attdatum))) ? \ (intptr_t) (cur_offset) : \ att_align_nominal(cur_offset, attalign) \ )
Definition at line 101 of file tupmacs.h.
Referenced by datum_compute_size(), and heap_compute_data_size().
#define att_align_nominal | ( | cur_offset, | ||
attalign | ||||
) |
( \ ((attalign) == 'i') ? INTALIGN(cur_offset) : \ (((attalign) == 'c') ? (intptr_t) (cur_offset) : \ (((attalign) == 'd') ? DOUBLEALIGN(cur_offset) : \ ( \ AssertMacro((attalign) == 's'), \ SHORTALIGN(cur_offset) \ ))) \ )
Definition at line 144 of file tupmacs.h.
Referenced by array_cmp(), array_contain_compare(), array_eq(), array_fill_internal(), array_iterate(), array_map(), array_out(), array_replace_internal(), array_seek(), array_send(), array_set(), array_slice_size(), array_to_text_internal(), array_unnest(), ArrayCastAndSet(), construct_md_array(), datum_write(), deconstruct_array(), ExecEvalScalarArrayOp(), get_text_array_contents(), hash_array(), heap_deform_tuple(), heap_fill_tuple(), needs_toast_table(), nocache_index_getattr(), nocachegetattr(), ReadArrayBinary(), ReadArrayStr(), and slot_deform_tuple().
#define att_align_pointer | ( | cur_offset, | ||
attalign, | ||||
attlen, | ||||
attptr | ||||
) |
( \ ((attlen) == -1 && VARATT_NOT_PAD_BYTE(attptr)) ? \ (intptr_t) (cur_offset) : \ att_align_nominal(cur_offset, attalign) \ )
Definition at line 122 of file tupmacs.h.
Referenced by heap_deform_tuple(), nocache_index_getattr(), nocachegetattr(), range_deserialize(), and slot_deform_tuple().
#define att_isnull | ( | ATT, | ||
BITS | ||||
) | (!((BITS)[(ATT) >> 3] & (1 << ((ATT) & 0x07)))) |
Definition at line 21 of file tupmacs.h.
Referenced by heap_attisnull(), heap_deform_tuple(), nocache_index_getattr(), nocachegetattr(), slot_deform_tuple(), and slot_getattr().
#define fetch_att | ( | T, | ||
attbyval, | ||||
attlen | ||||
) |
( \ (attbyval) ? \ ( \ (attlen) == (int) sizeof(int32) ? \ Int32GetDatum(*((int32 *)(T))) \ : \ ( \ (attlen) == (int) sizeof(int16) ? \ Int16GetDatum(*((int16 *)(T))) \ : \ ( \ AssertMacro((attlen) == 1), \ CharGetDatum(*((char *)(T))) \ ) \ ) \ ) \ : \ PointerGetDatum((char *) (T)) \ )
Definition at line 71 of file tupmacs.h.
Referenced by array_cmp(), array_contain_compare(), array_eq(), array_iterate(), array_map(), array_out(), array_replace_internal(), array_send(), array_to_text_internal(), ArrayCast(), deconstruct_array(), ExecEvalScalarArrayOp(), hash_array(), and range_deserialize().
Definition at line 37 of file tupmacs.h.
Referenced by heap_deform_tuple(), nocache_index_getattr(), nocachegetattr(), and slot_deform_tuple().
#define store_att_byval | ( | T, | ||
newdatum, | ||||
attlen | ||||
) |
do { \ switch (attlen) \ { \ case sizeof(char): \ *(char *) (T) = DatumGetChar(newdatum); \ break; \ case sizeof(int16): \ *(int16 *) (T) = DatumGetInt16(newdatum); \ break; \ case sizeof(int32): \ *(int32 *) (T) = DatumGetInt32(newdatum); \ break; \ default: \ elog(ERROR, "unsupported byval length: %d", \ (int) (attlen)); \ break; \ } \ } while (0)
Definition at line 222 of file tupmacs.h.
Referenced by ArrayCastAndSet(), datum_write(), and heap_fill_tuple().