Re: doubt about datum - Mailing list pgsql-novice

From Tom Lane
Subject Re: doubt about datum
Date
Msg-id 27907.1186414561@sss.pgh.pa.us
Whole thread Raw
In response to Re: doubt about datum  (Luca Ferrari <fluca1978@infinito.it>)
List pgsql-novice
Luca Ferrari <fluca1978@infinito.it> writes:
> header. In the htup.h file you find:

> typedef struct HeapTupleHeaderData
> {
>     union
>     {
>         HeapTupleFields t_heap;
>         DatumTupleFields t_datum;
>     }            t_choice;
>         ....
> }

> maybe I cannot get the meaning of the above t_datum in the tuple header, can
> anyone explain me that?

The t_datum fields are for use in an in-memory tuple that represents a
value of a composite type.  Being a Datum, it needs a length word and
some other stuff that are not needed in a row-on-disk; and it does not
need visibility info, which is what the t_heap fields are.

            regards, tom lane

pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: Atomic/locked "allocation" of table row?
Next
From: vamseelist@gmail.com
Date:
Subject: JOINING TWO TABLES