Re: Array initialisation notation in syscache.c - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: Array initialisation notation in syscache.c
Date
Msg-id CA+hUKGKK2oPsfogi0pukLAcnLUgmNWpPaQMAMtVd8ddiRPRhOQ@mail.gmail.com
Whole thread Raw
In response to Re: Array initialisation notation in syscache.c  (Peter Eisentraut <peter@eisentraut.org>)
Responses Re: Array initialisation notation in syscache.c
List pgsql-hackers
On Thu, Sep 21, 2023 at 8:19 PM Peter Eisentraut <peter@eisentraut.org> wrote:
> On 31.03.23 04:16, Thomas Munro wrote:
> >  From the light relief department, here is some more variadic macrology:
> >
> > -       tp = SearchSysCache1(TSPARSEROID, ObjectIdGetDatum(prsId));
> > +       tp = SearchSysCache(TSPARSEROID, ObjectIdGetDatum(prsId));
>
> I'm worried that if we are removing the variants with the explicit
> numbers, it will make it difficult for extensions to maintain
> compatibility with previous PG major versions.  They would probably have
> to copy much of your syscache.h changes into their own code.  Seems messy.

I suppose we could also supply a set of macros with the numbers that
map straight onto the numberless ones, with a note that they will be
deleted after N releases.  But maybe not worth the hassle for such a
tiny improvement in core code readability.  I will withdraw this
entry.  Thanks.



pgsql-hackers by date:

Previous
From: Dilip Kumar
Date:
Subject: Re: trying again to get incremental backup
Next
From: Laurenz Albe
Date:
Subject: Re: Fix output of zero privileges in psql