Re: useless RangeIOData->typiofunc - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: useless RangeIOData->typiofunc
Date
Msg-id 20200305141859.GA6736@alvherre.pgsql
Whole thread Raw
In response to Re: useless RangeIOData->typiofunc  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: useless RangeIOData->typiofunc
List pgsql-hackers
On 2020-Mar-04, Tom Lane wrote:

> Hm, I'm not sure that really lessens the cognitive load any, but
> if you do commit this please fix the dangling reference you left
> in the nearby comment:
> 
>  {
>     TypeCacheEntry *typcache;   /* range type's typcache entry */
> -   Oid         typiofunc;      /* element type's I/O function */
>     Oid         typioparam;     /* element type's I/O parameter */
>     FmgrInfo    proc;           /* lookup result for typiofunc */
>                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
>  } RangeIOData;

Thanks -- ISTM it makes more sense to put the FmgrInfo before the
typioparam too:

typedef struct RangeIOData
{
    TypeCacheEntry *typcache;    /* range type's typcache entry */
    FmgrInfo    proc;            /* element type's I/O function */
    Oid         typioparam;      /* element type's I/O parameter */
} RangeIOData;

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachment

pgsql-hackers by date:

Previous
From: Asif Rehman
Date:
Subject: Re: proposal: schema variables
Next
From: tushar
Date:
Subject: Re: [Proposal] Global temporary tables