Re: lookup_rowtype_tupdesc considered harmful

Поиск
Список
Период
Сортировка
От Neil Conway
Тема Re: lookup_rowtype_tupdesc considered harmful
Дата
Msg-id 1136835720.9116.5.camel@localhost.localdomain
обсуждение исходный текст
Ответ на Re: lookup_rowtype_tupdesc considered harmful  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: lookup_rowtype_tupdesc considered harmful  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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




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

Предыдущее
От: Jeremy Drake
Дата:
Сообщение: Re: catalog corruption bug
Следующее
От: Tom Lane
Дата:
Сообщение: Re: lookup_rowtype_tupdesc considered harmful