mirror of
https://github.com/postgres/postgres.git
synced 2025-04-22 23:02:54 +03:00
Rename argument of _outValue()
Rename from value to node, for consistency with similar functions. Discussion: https://www.postgresql.org/message-id/flat/c1097590-a6a4-486a-64b1-e1f9cc0533ce@enterprisedb.com
This commit is contained in:
parent
d9a38c52ce
commit
3d25b4ea6e
@ -3413,12 +3413,12 @@ _outAExpr(StringInfo str, const A_Expr *node)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_outValue(StringInfo str, const Value *value)
|
_outValue(StringInfo str, const Value *node)
|
||||||
{
|
{
|
||||||
switch (value->type)
|
switch (node->type)
|
||||||
{
|
{
|
||||||
case T_Integer:
|
case T_Integer:
|
||||||
appendStringInfo(str, "%d", value->val.ival);
|
appendStringInfo(str, "%d", node->val.ival);
|
||||||
break;
|
break;
|
||||||
case T_Float:
|
case T_Float:
|
||||||
|
|
||||||
@ -3426,7 +3426,7 @@ _outValue(StringInfo str, const Value *value)
|
|||||||
* We assume the value is a valid numeric literal and so does not
|
* We assume the value is a valid numeric literal and so does not
|
||||||
* need quoting.
|
* need quoting.
|
||||||
*/
|
*/
|
||||||
appendStringInfoString(str, value->val.str);
|
appendStringInfoString(str, node->val.str);
|
||||||
break;
|
break;
|
||||||
case T_String:
|
case T_String:
|
||||||
|
|
||||||
@ -3435,20 +3435,20 @@ _outValue(StringInfo str, const Value *value)
|
|||||||
* but we don't want it to do anything with an empty string.
|
* but we don't want it to do anything with an empty string.
|
||||||
*/
|
*/
|
||||||
appendStringInfoChar(str, '"');
|
appendStringInfoChar(str, '"');
|
||||||
if (value->val.str[0] != '\0')
|
if (node->val.str[0] != '\0')
|
||||||
outToken(str, value->val.str);
|
outToken(str, node->val.str);
|
||||||
appendStringInfoChar(str, '"');
|
appendStringInfoChar(str, '"');
|
||||||
break;
|
break;
|
||||||
case T_BitString:
|
case T_BitString:
|
||||||
/* internal representation already has leading 'b' */
|
/* internal representation already has leading 'b' */
|
||||||
appendStringInfoString(str, value->val.str);
|
appendStringInfoString(str, node->val.str);
|
||||||
break;
|
break;
|
||||||
case T_Null:
|
case T_Null:
|
||||||
/* this is seen only within A_Const, not in transformed trees */
|
/* this is seen only within A_Const, not in transformed trees */
|
||||||
appendStringInfoString(str, "NULL");
|
appendStringInfoString(str, "NULL");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
elog(ERROR, "unrecognized node type: %d", (int) value->type);
|
elog(ERROR, "unrecognized node type: %d", (int) node->type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user