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

From: Isaac Morland <isaac(dot)morland(at)gmail(dot)com>
To: "Smith, Peter" <peters(at)fast(dot)au(dot)fujitsu(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal: Make use of C99 designated initialisers for nulls/values arrays
Date: 2019-10-01 13:32:17
Message-ID: CAMsGm5ffGmwZxv1_o-=XEgJojMuvNiewC0EmOvitvYmDATeb0w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 1 Oct 2019 at 03:55, Smith, Peter <peters(at)fast(dot)au(dot)fujitsu(dot)com>
wrote:

> Typical Example:
> Before:
> Datum values[Natts_pg_attribute];
> bool nulls[Natts_pg_attribute];
> ...
> memset(values, 0, sizeof(values));
> memset(nulls, false, sizeof(nulls));
> After:
> Datum values[Natts_pg_attribute] = {0};
> bool nulls[Natts_pg_attribute] = {0};
>

I hope you'll forgive a noob question. Why does the "After" initialization
for the boolean array have {0} rather than {false}?

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2019-10-01 13:34:13 Re: [HACKERS] Block level parallel vacuum
Previous Message Amit Kapila 2019-10-01 13:31:32 Re: [HACKERS] Block level parallel vacuum