Re: Proposal: Add more compile-time asserts to expose inconsistencies.

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: "Smith, Peter" <peters(at)fast(dot)au(dot)fujitsu(dot)com>
Cc: "andres(at)anarazel(dot)de" <andres(at)anarazel(dot)de>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>, "peter(dot)eisentraut(at)2ndquadrant(dot)com" <peter(dot)eisentraut(at)2ndquadrant(dot)com>, "tgl(at)sss(dot)pgh(dot)pa(dot)us" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "ilmari(at)ilmari(dot)org" <ilmari(at)ilmari(dot)org>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Proposal: Add more compile-time asserts to expose inconsistencies.
Date: 2019-12-24 05:47:29
Message-ID: 20191224054729.GC323806@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Dec 20, 2019 at 01:08:47AM +0000, Smith, Peter wrote:
> I updated the most recent patch (_5 from Michael) so it now has your
> suggested error message rewording.

Hmm. Based on the last messages, and this one in particular:
https://www.postgresql.org/message-id/20191202155545.yzbfzuppjritidqr@alap3.anarazel.de

I am still seeing that a couple of points need an extra lookup:
- Addition of a Decl() in at least one header of the core code.
- Perhaps unifying the fallback implementation between C and C++, with
a closer lookup in particular at StaticAssertStmt() and
StaticAssertExpr().

Peter, could you look at that? In order to test the C++ portion, you
could use this dummy C++ extension I have just published on my github
account:
https://github.com/michaelpq/pg_plugins/tree/master/blackhole_cplusplus

That's a dirty 15-min hack, but that would be enough to check the C++
part with PGXS. For now, I am switching the patch as waiting on
author for now.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2019-12-24 06:37:49 Re: [HACKERS] Block level parallel vacuum
Previous Message Masahiko Sawada 2019-12-24 05:46:55 Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions