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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: Joe Nelson <joe(at)begriffs(dot)com>, Isaac Morland <isaac(dot)morland(at)gmail(dot)com>, Chapman Flack <chap(at)anastigmatix(dot)net>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Proposal: Make use of C99 designated initialisers for nulls/values arrays
Date: 2019-10-21 19:04:36
Message-ID: 3378.1571684676@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Stephen Frost <sfrost(at)snowman(dot)net> writes:
> * Joe Nelson (joe(at)begriffs(dot)com) wrote:
>> If it's being put behind a macro then *stylistically* it shouldn't
>> matter whether {} or {0} is chosen, right? In which case {0} would
>> be a better choice because it's supported everywhere.

> The problem with {0} in the first place is that it doesn't actually work
> in all cases... Simple cases, yes, but not more complex ones. It's
> unfortunate that there isn't a general solution here that works across
> platforms (even if it involved macros..), but that seems to be the case.

There is a general solution that works across platforms; it's called
memset() and it's what we're using today. I'm beginning to think that
we should just reject this patch. It's certainly not enough of an
improvement to justify the amount of discussion that's gone into it.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2019-10-21 19:36:32 Re: Proposal: Make use of C99 designated initialisers for nulls/values arrays
Previous Message Tom Lane 2019-10-21 18:58:13 Re: intermittent test failure on Windows