aboutsummaryrefslogtreecommitdiff
path: root/src/include/postgres_fe.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/postgres_fe.h')
-rw-r--r--src/include/postgres_fe.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/include/postgres_fe.h b/src/include/postgres_fe.h
index fcfbd31d35c..8fd580fbf75 100644
--- a/src/include/postgres_fe.h
+++ b/src/include/postgres_fe.h
@@ -24,4 +24,16 @@
#include "c.h"
+/*
+ * Assert() can be used in both frontend and backend code. In frontend code it
+ * just calls the standard assert, if it's available. If use of assertions is
+ * not configured, it does nothing.
+ */
+#ifdef USE_ASSERT_CHECKING
+#include <assert.h>
+#define Assert(p) assert(p)
+#else
+#define Assert(p)
+#endif
+
#endif /* POSTGRES_FE_H */