Re: useless RangeIOData->typiofunc

Поиск
Список
Период
Сортировка
От Paul Jungwirth
Тема Re: useless RangeIOData->typiofunc
Дата
Msg-id 2f266b59-86ab-af94-902f-5c5a6a834de4@illuminatedcomputing.com
обсуждение исходный текст
Ответ на useless RangeIOData->typiofunc  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
On 3/4/20 1:57 PM, Alvaro Herrera wrote:
> I noticed while going over the multirange types patch that it adds a
> pointless typiofunc cached OID to a struct used for I/O functions'
> fn_extra.  It seems to go completely unused, so I checked range types
> (which this was cribbed from) and indeed, it is completely unused there
> either.  My guess is that it was in turn cribbed from array's
> ArrayMetaState, which is considerably more sophisticated; I suspect
> nobody noticed that caching it was pointless.

I didn't believe it at first but I think you're right. :-)

> Here's a patch to remove it from rangetypes.c.  It doesn't really waste
> much memory anyway, but removing it lessens the cognitive load by one or
> two bits.

Looks good to me, and it seems okay to make the same edits to 
multirangetypes.c

Yours,

-- 
Paul              ~{:-)
pj@illuminatedcomputing.com



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

Предыдущее
От: Paul Jungwirth
Дата:
Сообщение: Re: range_agg
Следующее
От: Tom Lane
Дата:
Сообщение: Re: useless RangeIOData->typiofunc