Using HeapTuple.t_len to verify size of tuple

From: Vignesh Raghunathan <vignesh(dot)pgsql(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Using HeapTuple.t_len to verify size of tuple
Date: 2015-08-25 21:43:57
Message-ID: CAD_AmVjPzQ=69Heea0x7rUtG9athG6y5GJOLkPqNLjFK31vyuA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello,

Can the t_len field in HeapTuple structure be used to verify the length of
the tuple?

That is, if I calculate the length from the contents of the tuple using
data from pg_attribute for fixed length fields and the data from the header
for varlena fields, should it always match the value stored in t_len?

Thanks,
VIgnesh

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2015-08-25 21:45:20 Re: 9.4 broken on alpha
Previous Message Joe Conway 2015-08-25 21:27:56 Re: One question about security label command