Re: HeapTuple layout

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Michael Klatt <mdklatt(at)ou(dot)edu>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: HeapTuple layout
Date: 2002-03-07 17:15:46
Message-ID: 10759.1015521346@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Michael Klatt <mdklatt(at)ou(dot)edu> writes:
> Is a HeapTuple for a particular table guaranteed to have the same layout
> (order and number of attributes) as that table?

Define what you mean by "for a table". If it's actually intended to be
stored in the table then it had better have the right layout. A tuple
read from a table will have the expected layout but may be missing
columns at the end (in case it hasn't been updated since an ALTER TABLE
ADD COLUMN command). The standard tuple access routines treat this case
as meaning that the missing columns are NULLs.

> Also, is a HeapTuple used to store the tuples in a PGresult?

No, HeapTuples are only used inside the backend.

regards, tom lane

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Mark Johannessen 2002-03-07 21:23:16 pgsql_perl5-1.9.0 install problem
Previous Message paul simdars 2002-03-07 17:14:15 pgaccess error