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

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Bruce Momjian <bruce(at)momjian(dot)us>, Andrew Dunstan <andrew(dot)dunstan(at)2ndquadrant(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, "Smith, Peter" <peters(at)fast(dot)au(dot)fujitsu(dot)com>, 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 20:36:56
Message-ID: CA+hUKGJq5mO7dLhtc-BL9C373P76uAB0i55cxGJ7oFOsWMJkHg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Oct 2, 2019 at 5:49 AM Andres Freund <andres(at)anarazel(dot)de> wrote:
> On 2019-10-01 12:17:08 -0400, Tom Lane wrote:
> > Note though that InsertPgAttributeTuple uses memset(), while some of
> > these other places use MemSet(). The code I see being generated for
> > MemSet() is also the same(!) on clang, but it is different and
> > probably worse on gcc. I wonder if it isn't time to kick MemSet to
> > the curb. We have not re-evaluated that macro in more than a dozen
> > years, and compilers have surely changed.
>
> Yes, we really should!

+1

FWIW I experimented with that over here:

https://www.postgresql.org/message-id/CA%2BhUKGLfa6ANa0vs7Lf0op0XBH05HE8SyX8NFhDyT7k2CHYLXw%40mail.gmail.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-10-01 22:09:47 Re: Modest proposal for making bpchar less inconsistent
Previous Message Alexander Korotkov 2019-10-01 17:41:43 Re: pgsql: Implement jsonpath .datetime() method