Re: lookup_rowtype_tupdesc considered harmful

From: Neil Conway <neilc(at)samurai(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: lookup_rowtype_tupdesc considered harmful
Date: 2006-01-09 19:42:00
Message-ID: 1136835720.9116.5.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-01-09 19:51:52 Re: lookup_rowtype_tupdesc considered harmful
Previous Message Jeremy Drake 2006-01-09 19:41:36 Re: catalog corruption bug