From 53060b6d1e0126a72b0a84a29476e8b1fc113f81 Mon Sep 17 00:00:00 2001 From: "Karl O. Pinc kop@karlpinc.com" Date: Mon, 8 Jun 2026 23:28:59 +0000 Subject: [PATCH] Fix so null_xor_null() macro can be used on dispariate data types --- db/include/tablemacros.m4 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/db/include/tablemacros.m4 b/db/include/tablemacros.m4 index f9b32b9..ca8f2e2 100644 --- a/db/include/tablemacros.m4 +++ b/db/include/tablemacros.m4 @@ -301,7 +301,8 @@ changequote([,]) define([null_xor_null], [CONSTRAINT "One of $1 and $2 must be NULL and the other not-NULL" CHECK(($1 IS NULL OR $2 IS NULL) - AND COALESCE($1, $2) IS NOT NULL)])dnl + AND ($1 IS NOT NULL + OR $2 IS NOT NULL))])dnl changequote(`,')dnl See above -- One column must be NULL if another is. -- 2.34.1