Re: doubt about datum

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Luca Ferrari <fluca1978(at)infinito(dot)it>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: doubt about datum
Date: 2007-08-06 15:36:01
Message-ID: 27907.1186414561@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Luca Ferrari <fluca1978(at)infinito(dot)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

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message vamseelist 2007-08-06 16:07:54 JOINING TWO TABLES
Previous Message Tom Lane 2007-08-06 15:19:23 Re: Atomic/locked "allocation" of table row?