From: Paul Jungwirth <pj@illuminatedcomputing.com>
To: pgsql-hackers@lists.postgresql.org
Subject: Re: useless RangeIOData->typiofunc
Date: Wed, 4 Mar 2020 14:34:02 -0800
Message-ID: <2f266b59-86ab-af94-902f-5c5a6a834de4@illuminatedcomputing.com> (raw)
In-Reply-To: <20200304215711.GA8732@alvherre.pgsql>
References: <20200304215711.GA8732@alvherre.pgsql>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: pj@illuminatedcomputing.com, pgsql-hackers@lists.postgresql.org
Subject: Re: useless RangeIOData->typiofunc
In-Reply-To: <2f266b59-86ab-af94-902f-5c5a6a834de4@illuminatedcomputing.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox