Re: Proposal: Add more compile-time asserts to exposeinconsistencies. - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Proposal: Add more compile-time asserts to exposeinconsistencies.
Date
Msg-id 7107be28-dc7f-34e5-bd80-1260b0732e50@2ndquadrant.com
Whole thread Raw
In response to Re: Proposal: Add more compile-time asserts to exposeinconsistencies.  (Andres Freund <andres@anarazel.de>)
Responses Re: Proposal: Add more compile-time asserts to exposeinconsistencies.  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
On 2019-12-02 16:55, Andres Freund wrote:
>> +StaticAssertDecl(lengthof(LockTagTypeNames) == (LOCKTAG_ADVISORY + 1),
>> +                 "LockTagTypeNames array inconsistency");
>> +
> These error messages strike me as somewhat unhelpful. I'd probably just
> reword them as "array length mismatch" or something like that.

I'd prefer it if we could just get rid of the second argument and show 
the actual expression in the error message, like run-time assertions work.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Tatsuro Yamada
Date:
Subject: Re: progress report for ANALYZE
Next
From: Hubert Zhang
Date:
Subject: Re: Yet another vectorized engine