From fa9a95d6c4ced0242ab8a631dbd40979a1c577c9 Mon Sep 17 00:00:00 2001
From: Tom Lane <tgl@sss.pgh.pa.us>
Date: Tue, 10 Jul 2001 00:02:02 +0000
Subject: [PATCH] Remove unnecessarily enthusiastic parenthesizing in
 reverse-listing of IS NULL, IS TRUE, and friends (my fault...)

---
 src/backend/utils/adt/ruleutils.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/backend/utils/adt/ruleutils.c b/src/backend/utils/adt/ruleutils.c
index ae1a8c1fb18..5f7cfead6c1 100644
--- a/src/backend/utils/adt/ruleutils.c
+++ b/src/backend/utils/adt/ruleutils.c
@@ -3,7 +3,7 @@
  *				back to source text
  *
  * IDENTIFICATION
- *	  $Header: /cvsroot/pgsql/src/backend/utils/adt/ruleutils.c,v 1.78 2001/06/19 22:39:12 tgl Exp $
+ *	  $Header: /cvsroot/pgsql/src/backend/utils/adt/ruleutils.c,v 1.79 2001/07/10 00:02:02 tgl Exp $
  *
  *	  This software is copyrighted by Jan Wieck - Hamburg.
  *
@@ -1951,15 +1951,15 @@ get_rule_expr(Node *node, deparse_context *context)
 			{
 				NullTest		*ntest = (NullTest *) node;
 
-				appendStringInfo(buf, "((");
+				appendStringInfo(buf, "(");
 				get_rule_expr(ntest->arg, context);
 			    switch (ntest->nulltesttype)
 			    {
 			        case IS_NULL:
-						appendStringInfo(buf, ") IS NULL)");
+						appendStringInfo(buf, " IS NULL)");
 						break;
 			        case IS_NOT_NULL:
-						appendStringInfo(buf, ") IS NOT NULL)");
+						appendStringInfo(buf, " IS NOT NULL)");
 						break;
 			        default:
 			            elog(ERROR, "get_rule_expr: unexpected nulltesttype %d",
@@ -1972,27 +1972,27 @@ get_rule_expr(Node *node, deparse_context *context)
 			{
 				BooleanTest		*btest = (BooleanTest *) node;
 
-				appendStringInfo(buf, "((");
+				appendStringInfo(buf, "(");
 				get_rule_expr(btest->arg, context);
 			    switch (btest->booltesttype)
 			    {
 			        case IS_TRUE:
-						appendStringInfo(buf, ") IS TRUE)");
+						appendStringInfo(buf, " IS TRUE)");
 						break;
 			        case IS_NOT_TRUE:
-						appendStringInfo(buf, ") IS NOT TRUE)");
+						appendStringInfo(buf, " IS NOT TRUE)");
 						break;
 			        case IS_FALSE:
-						appendStringInfo(buf, ") IS FALSE)");
+						appendStringInfo(buf, " IS FALSE)");
 						break;
 			        case IS_NOT_FALSE:
-						appendStringInfo(buf, ") IS NOT FALSE)");
+						appendStringInfo(buf, " IS NOT FALSE)");
 						break;
 			        case IS_UNKNOWN:
-						appendStringInfo(buf, ") IS UNKNOWN)");
+						appendStringInfo(buf, " IS UNKNOWN)");
 						break;
 			        case IS_NOT_UNKNOWN:
-						appendStringInfo(buf, ") IS NOT UNKNOWN)");
+						appendStringInfo(buf, " IS NOT UNKNOWN)");
 						break;
 			        default:
 			            elog(ERROR, "get_rule_expr: unexpected booltesttype %d",
-- 
GitLab