Re: Difference between HeapTupleData and TupleTableSlot structures

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Difference between HeapTupleData and TupleTableSlot structures
Дата
Msg-id 3461454.1665197886@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Difference between HeapTupleData and TupleTableSlot structures  (Ajay P S <ajayps547@gmail.com>)
Ответы Re: Difference between HeapTupleData and TupleTableSlot structures  (Aleksander Alekseev <aleksander@timescale.com>)
Список pgsql-hackers
Ajay P S <ajayps547@gmail.com> writes:
> I am pretty new to the Postgres code base. I would like to know the
> difference between HeapTupleData and TupleTableSlot structures.

HeapTupleData is just a pointer to a concrete tuple.  It exists
mainly because it's often convenient to pass around the tuple's
logical location (table OID and t_self) along with the tuple.
The comments about it in htup.h tell you about all you need to
know.

TupleTableSlot is a more abstract concept, being a container
for a tuple that can be present in several different forms.
It can contain a concrete tuple (HeapTupleData), or a "virtual"
tuple that is just an array of Datum+isnull values.  The executor
usually uses tuple slots to return tuples out of plan nodes;
they're not very common elsewhere.

            regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: START_REPLICATION SLOT causing a crash in an assert build
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: use has_privs_of_role() for pg_hba.conf