From 76d783f4e472ea466cca0d126798505f851e54d0 Mon Sep 17 00:00:00 2001
From: Justin Pryzby <pryzbyj@telsasoft.com>
Date: Sat, 10 Apr 2021 23:08:58 -0500
Subject: [PATCH 3/3] Test integer using == and not &

---
 contrib/postgres_fdw/deparse.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/postgres_fdw/deparse.c b/contrib/postgres_fdw/deparse.c
index 2c702c0e37..c2b1269f73 100644
--- a/contrib/postgres_fdw/deparse.c
+++ b/contrib/postgres_fdw/deparse.c
@@ -2195,7 +2195,7 @@ deparseTruncateSql(StringInfo buf,
 
 		if (lc1 != list_head(rels))
 			appendStringInfoString(buf, ", ");
-		if (extra & TRUNCATE_REL_CONTEXT_ONLY)
+		if (extra == TRUNCATE_REL_CONTEXT_ONLY)
 			appendStringInfoString(buf, "ONLY ");
 
 		deparseRelation(buf, rel);
-- 
2.17.0

