Is a syscache tuple more like an on-disk tuple or a freshly made one?

Поиск
Список
Период
Сортировка
От Chapman Flack
Тема Is a syscache tuple more like an on-disk tuple or a freshly made one?
Дата
Msg-id 5711633E.20503@anastigmatix.net
обсуждение исходный текст
Ответы Re: Is a syscache tuple more like an on-disk tuple or a freshly made one?  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Re: Is a syscache tuple more like an on-disk tuple or a freshly made one?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Please bear with a neophyte question ...

I am tempted to apply HeapTupleGetDatum to a tuple retrieved from
the syscache (as I already have code for processing a tuple presented
as a Datum).

But I see a comment on HeapTupleHeaderGetDatum: "This must *not* get
applied to an on-disk tuple; the tuple should be freshly made by
heap_form_tuple or some wrapper ..."

... and here I confess I'm unsure whether a tuple retrieved from
the syscache is more like an on-disk one, or a freshly-made one,
for purposes of the warning in that comment.

Is there a conventional proper way to pass a tuple retrieved from
syscache to code that accepts a tuple as a Datum? Or is there some
fundamental reason a smart person wouldn't do that?

Thanks,
-Chap



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: [COMMITTERS] pgsql: Add new catalog called pg_init_privs
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Is a syscache tuple more like an on-disk tuple or a freshly made one?