On Mon, 2006-01-09 at 12:57 -0500, Tom Lane wrote:
> I have not been able to think of an efficient way to make it work while
> still handing back a simple TupleDesc pointer --- seems like we'd have
> to contort the API somehow so that the "release" function can find the
> reference count. Any thoughts about that?
Perhaps the "release" function can just take a type OID. We could then
use that to lookup the OID's typcache entry, which would be a convenient
place to store the reference count (especially if we do generalized
typcache invalidation, per discussion on -patches). That means two hash
table lookups for each lookup/release pair, which isn't ideal but
doesn't seem too bad.
> I've got plenty of stuff to do, will be happy to let you take up this
> problem, if you have time to do something with it soon.
I'll take a look.
-Neil