Re: Proposal: Make use of C99 designated initialisers for nulls/values arrays

From: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
To: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Bruce Momjian <bruce(at)momjian(dot)us>, Chapman Flack <chap(at)anastigmatix(dot)net>, Ashwin Agrawal <aagrawal(at)pivotal(dot)io>, Jacob Champion <pchampion(at)pivotal(dot)io>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal: Make use of C99 designated initialisers for nulls/values arrays
Date: 2019-10-18 02:51:20
Message-ID: CAA4eK1J-MDs6__hxOz0wB+VirO7uwQLZx4+2d8awhPZo64JpgA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Oct 17, 2019 at 4:58 PM Kyotaro Horiguchi
<horikyota(dot)ntt(at)gmail(dot)com> wrote:
>
> At Thu, 17 Oct 2019 16:30:02 +0900, Michael Paquier <michael(at)paquier(dot)xyz> wrote in
> > On Thu, Oct 17, 2019 at 06:37:11PM +1300, Thomas Munro wrote:
> > > -1 for these macros.
> > >
> > > These are basic facts about the C language. I hope C eventually
> > > supports {} like C++, so that you don't have to think hard about
> > > whether the first member is another struct, and recursively so … but
> > > since the macros can't help with that problem, what is the point?
> >
> > FWIW, I am not convinced that those macros are an improvement either.
>
> FWIW agreed. I might have put +1 if it had multpile definitions
> according to platforms, though.
>

Thanks, Thomas, Michael, and Horiguchi-San. I think there are enough
votes on not using a macro that we can proceed with that approach.
This takes us back to what Smith, Peter has initially proposed [1].
I shall wait for a couple of days to see if someone would like to
argue otherwise and then review the proposed patch.

[1] - https://www.postgresql.org/message-id/201DD0641B056142AC8C6645EC1B5F62014B919631%40SYD1217

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2019-10-18 03:06:30 Re: libpq: Fix wrong connection status on invalid "connect_timeout"
Previous Message Amit Kapila 2019-10-18 02:43:10 Re: maintenance_work_mem used by Vacuum