From: Nathan Bossart <nathandbossart@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Simplifying our Trap/Assert infrastructure
Date: Sun, 9 Oct 2022 14:01:48 -0700
Message-ID: <20221009210148.GA900071@nathanxps13> (raw)
In-Reply-To: <3928703.1665345117@sss.pgh.pa.us>
References: <3928703.1665345117@sss.pgh.pa.us>
On Sun, Oct 09, 2022 at 03:51:57PM -0400, Tom Lane wrote:
> I happened to notice that the Trap and TrapMacro macros defined in c.h
> have a grand total of one usage apiece across our entire code base.
> It seems a little pointless and confusing to have them at all, since
> they're essentially Assert/AssertMacro but with the inverse condition
> polarity. I'm also annoyed that they are documented while the macros
> we actually use are not.
+1, I noticed this recently, too.
> Hence, I propose the attached.
The patch LGTM. It might be worth removing usages of AssertArg and
AssertState, too, but that can always be done separately.
--
Nathan Bossart
Amazon Web Services: https://aws.amazon.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: nathandbossart@gmail.com, tgl@sss.pgh.pa.us, pgsql-hackers@lists.postgresql.org
Subject: Re: Simplifying our Trap/Assert infrastructure
In-Reply-To: <20221009210148.GA900071@nathanxps13>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox