useless RangeIOData->typiofunc

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: useless RangeIOData->typiofunc
Date: 2020-03-04 21:57:11
Message-ID: 20200304215711.GA8732@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

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.

--
Álvaro Herrera

Attachment Content-Type Size
range-typiofunc-cleanup.patch text/x-diff 1.5 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2020-03-04 22:16:20 Re: Ought to use heap_multi_insert() for pg_attribute/depend insertions?
Previous Message Justin Pryzby 2020-03-04 21:53:38 Re: error context for vacuum to include block number