summaryrefslogtreecommitdiff
path: root/src/include/postgres.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/postgres.h')
-rw-r--r--src/include/postgres.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/include/postgres.h b/src/include/postgres.h
index 7d93fbce709..8b92f453e7a 100644
--- a/src/include/postgres.h
+++ b/src/include/postgres.h
@@ -544,6 +544,20 @@ Float8GetDatum(float8 X)
*/
/*
+ * pg_ternary
+ * Boolean value with an extra "unset" value
+ *
+ * This enum can be used for values that want to distinguish between true,
+ * false, and unset.
+*/
+typedef enum pg_ternary
+{
+ PG_TERNARY_FALSE = 0,
+ PG_TERNARY_TRUE = 1,
+ PG_TERNARY_UNSET = -1
+} pg_ternary;
+
+/*
* NON_EXEC_STATIC: It's sometimes useful to define a variable or function
* that is normally static but extern when using EXEC_BACKEND (see
* pg_config_manual.h). There would then typically be some code in