[HACKERS] Does having a NULL column automatically exclude the table from thetupleDesc cache?
От | Ryan Murphy |
---|---|
Тема | [HACKERS] Does having a NULL column automatically exclude the table from thetupleDesc cache? |
Дата | |
Msg-id | CAHeEsBcw6JcGzh6zKqcVJCi-UUAV815AvZr=3tx_kMYNr+s+HA@mail.gmail.com обсуждение исходный текст |
Ответы |
Re: [HACKERS] Does having a NULL column automatically exclude the table from the tupleDesc cache?
|
Список | pgsql-hackers |
Hi all,
I was looking through some of the implementation details of the heap/tuples, specifically src/include/access/htup_details.h - and I came across the big macro fastgetattr, and had a question about it. I've included the code here for clarity and convenience:#define fastgetattr(tup, attnum, tupleDesc, isnull) \
( \
AssertMacro((attnum) > 0), \
(*(isnull) = false), \
HeapTupleNoNulls(tup) ? \
( \
(tupleDesc)->attrs[(attnum)-1]->attcacheoff >= 0 ? \
( \
fetchatt((tupleDesc)->attrs[(attnum)-1], \
(char *) (tup)->t_data + (tup)->t_data->t_hoff + \
(tupleDesc)->attrs[(attnum)-1]->attcacheoff) \
) \
: \
nocachegetattr((tup), (attnum), (tupleDesc)) \
) \
: \
( \
att_isnull((attnum)-1, (tup)->t_data->t_bits) ? \
( \
(*(isnull) = true), \
(Datum)NULL \
) \
: \
( \
nocachegetattr((tup), (attnum), (tupleDesc)) \
) \
) \
)
В списке pgsql-hackers по дате отправления: