Re: [HACKERS] static assertions in C++

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] static assertions in C++
Date: 2017-11-29 15:03:07
Message-ID: 30209.1511967787@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Wed, Nov 29, 2017 at 9:26 AM, Peter Eisentraut
> <peter(dot)eisentraut(at)2ndquadrant(dot)com> wrote:
>> I'd still like a review of this patch.

> I don't think there's much to review apart from this one issue.
> Neither Tom nor I seem to be convinced about:
> +/* not worth providing a workaround */
> I suggested that it was worth providing a workaround, and Tom
> suggested that the case might be so rare that we could just #error if
> happens. If you agree that it's never likely to come up, I suggest
> going with Tom's #error proposal; otherwise, I suggest trying to find
> a workable workaround.

Right now, we have the property that every build enforces static
assertions, albeit with variable quality of the error messages.
I strongly disagree that it's okay to throw that property away.
I do think that we could put an #error here instead, and wait to see
if anyone complains before expending effort on a workaround.

> Apart from that, the only thing I see is that it seems like the
> comment block just before your code changes might need some updating.

Agreed, that would need some love as well. I have no other comments
either.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2017-11-29 15:05:08 Re: using index or check in ALTER TABLE SET NOT NULL
Previous Message Robert Haas 2017-11-29 15:01:37 Re: es_query_dsa is broken