From 5ee73525d57380a55b5c87f8df1c30bd32fb98b3 Mon Sep 17 00:00:00 2001
From: Robert Haas <rhaas@postgresql.org>
Date: Fri, 28 Jun 2013 09:30:38 -0400
Subject: [PATCH] Define Trap and TrapMacro even in non-cassert builds.

In some cases, the use of these macros may be preferable to Assert()
or AssertMacro(), since this way the caller can set the trap message.

Andres Freund and Robert Haas
---
 src/include/c.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/include/c.h b/src/include/c.h
index f2c9e12fb34..596118342df 100644
--- a/src/include/c.h
+++ b/src/include/c.h
@@ -573,6 +573,9 @@ typedef NameData *Name;
 #define AssertMacro(condition)	((void)true)
 #define AssertArg(condition)
 #define AssertState(condition)
+#define Trap(condition, errorType)
+#define TrapMacro(condition, errorType)	(true)
+
 #elif defined(FRONTEND)
 
 #include <assert.h>
-- 
GitLab