v1-0002-Rename-argument-of-_outValue.patch
text/plain
Filename: v1-0002-Rename-argument-of-_outValue.patch
Type: text/plain
Part: 1
Patch
Format: format-patch
Series: patch v1-0002
Subject: Rename argument of _outValue()
| File | + | − |
|---|---|---|
| src/backend/nodes/outfuncs.c | 8 | 8 |
From 7746ddd4f2a9534322b2b9226007638d3142c0c7 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter@eisentraut.org>
Date: Mon, 7 Jun 2021 15:47:56 +0200
Subject: [PATCH v1 02/10] Rename argument of _outValue()
Rename from value to node, for consistency with similar functions.
---
src/backend/nodes/outfuncs.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/backend/nodes/outfuncs.c b/src/backend/nodes/outfuncs.c
index 04696f613c..b54c57d09f 100644
--- a/src/backend/nodes/outfuncs.c
+++ b/src/backend/nodes/outfuncs.c
@@ -3402,12 +3402,12 @@ _outAExpr(StringInfo str, const A_Expr *node)
}
static void
-_outValue(StringInfo str, const Value *value)
+_outValue(StringInfo str, const Value *node)
{
- switch (value->type)
+ switch (node->type)
{
case T_Integer:
- appendStringInfo(str, "%d", value->val.ival);
+ appendStringInfo(str, "%d", node->val.ival);
break;
case T_Float:
@@ -3415,7 +3415,7 @@ _outValue(StringInfo str, const Value *value)
* We assume the value is a valid numeric literal and so does not
* need quoting.
*/
- appendStringInfoString(str, value->val.str);
+ appendStringInfoString(str, node->val.str);
break;
case T_String:
@@ -3424,20 +3424,20 @@ _outValue(StringInfo str, const Value *value)
* but we don't want it to do anything with an empty string.
*/
appendStringInfoChar(str, '"');
- if (value->val.str[0] != '\0')
- outToken(str, value->val.str);
+ if (node->val.str[0] != '\0')
+ outToken(str, node->val.str);
appendStringInfoChar(str, '"');
break;
case T_BitString:
/* internal representation already has leading 'b' */
- appendStringInfoString(str, value->val.str);
+ appendStringInfoString(str, node->val.str);
break;
case T_Null:
/* this is seen only within A_Const, not in transformed trees */
appendStringInfoString(str, "NULL");
break;
default:
- elog(ERROR, "unrecognized node type: %d", (int) value->type);
+ elog(ERROR, "unrecognized node type: %d", (int) node->type);
break;
}
}
--
2.31.1