| От | Tom Lane |
|---|---|
| Тема | Re: Using HeapTuple.t_len to verify size of tuple |
| Дата | |
| Msg-id | 21367.1440539762@sss.pgh.pa.us обсуждение |
| Ответ на | Using HeapTuple.t_len to verify size of tuple (Vignesh Raghunathan <vignesh.pgsql@gmail.com>) |
| Ответы |
Re: Using HeapTuple.t_len to verify size of tuple
|
| Список | pgsql-hackers |
Vignesh Raghunathan <vignesh.pgsql@gmail.com> writes:
> 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?
If t_len were *less* than that, it would be a bug. But I think it's
fairly common for t_len to be rounded up to the next maxalign boundary.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера