On Tue, 2006-01-10 at 09:47 -0500, Tom Lane wrote:
> I had a further thought about this. What we're really talking about
> here is a reference-counted TupleDesc structure: it's got no necessary
> connection to TypeCacheEntry at all.
Yeah, I came to basically the same conclusion when implementing the
patch ("RefCountedTupleDesc" vs. a normal "TupleDesc"). I assumed that
there was a need to have two variants of the structure (one refcounted,
one not), but you're right that just adding refcounting to TupleDesc
directly doesn't have a lot of overhead, and avoids the confusion of two
similar-but-not-identical structs. I'll post a patch when it's finished
(hopefully tonight).
-Neil