]> granicus.if.org Git - postgresql/commitdiff
Remove unnecessarily enthusiastic parenthesizing in reverse-listing of
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 10 Jul 2001 00:02:02 +0000 (00:02 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 10 Jul 2001 00:02:02 +0000 (00:02 +0000)
IS NULL, IS TRUE, and friends (my fault...)

src/backend/utils/adt/ruleutils.c

index ae1a8c1fb18a750e2b871549af6d4c29bde3fd11..5f7cfead6c189f094364fa28e3878577716dc11d 100644 (file)
@@ -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",