Re: Wrap access to Oid in HeapTupleHeader - Mailing list pgsql-patches

From Manfred Koizar
Subject Re: Wrap access to Oid in HeapTupleHeader
Date
Msg-id d8q0iugp1jaccqus19co089jh9vstn1pk0@4ax.com
Whole thread Raw
In response to Re: Wrap access to Oid in HeapTupleHeader  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Wrap access to Oid in HeapTupleHeader
List pgsql-patches
On Mon, 01 Jul 2002 09:46:41 -0400, Tom Lane <tgl@sss.pgh.pa.us>
wrote:
>Manfred Koizar <mkoi-pg@aon.at> writes:
>> .  the heap tuple header is already formatted, i.e. t_hoff is valid
>
>I think the latter test is unnecessary

Yes, currently.

> and potentially dangerous;

That's the reason, I explicitly mentioned it.

>it could break code that tries to access OID in a
>not-yet-completely-built header.  The test that insists t_hoff is valid
>before one can *set* OID is even more likely to cause trouble.

This was actually the case in one or two places;  I had to change the
order of assignments there.  The code does not contain too many places
where a heap tuple header is built.  If the assertions break the code,
we (or in this case: I) have to fix it.  I need the assertions to find
those spots, if there are any left.

>I do not see the point of this in any case.

I see you have read my proposal on -hackers in the meantime.  Does
that make it clearer?

>            regards, tom lane
Thanks for reviewing my patch!

Servus
 Manfred



pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: Changes in /contrib/fulltextindex
Next
From: Tom Lane
Date:
Subject: Re: Wrap access to Oid in HeapTupleHeader