Re: Array initialisation notation in syscache.c

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Array initialisation notation in syscache.c
Date: 2023-11-14 04:31:57
Message-ID: CA+hUKGKK2oPsfogi0pukLAcnLUgmNWpPaQMAMtVd8ddiRPRhOQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Sep 21, 2023 at 8:19 PM Peter Eisentraut <peter(at)eisentraut(dot)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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Laurenz Albe 2023-11-14 04:40:14 Re: Fix output of zero privileges in psql
Previous Message Dilip Kumar 2023-11-14 04:28:22 Re: trying again to get incremental backup