1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-11 10:01:57 +03:00

Rename value node fields

For the formerly-Value node types, rename the "val" field to a name
specific to the node type, namely "ival", "fval", "sval", and "bsval".
This makes some code clearer and catches mixups better.

Reviewed-by: Pavel Stehule <pavel.stehule@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/8c1a2e37-c68d-703c-5a83-7a6077f4f997@enterprisedb.com
This commit is contained in:
Peter Eisentraut
2022-01-14 10:46:49 +01:00
parent 93415a3b5a
commit c4cc2850f4
12 changed files with 53 additions and 53 deletions

View File

@ -3421,7 +3421,7 @@ _outA_Expr(StringInfo str, const A_Expr *node)
static void
_outInteger(StringInfo str, const Integer *node)
{
appendStringInfo(str, "%d", node->val);
appendStringInfo(str, "%d", node->ival);
}
static void
@ -3431,7 +3431,7 @@ _outFloat(StringInfo str, const Float *node)
* We assume the value is a valid numeric literal and so does not
* need quoting.
*/
appendStringInfoString(str, node->val);
appendStringInfoString(str, node->fval);
}
static void
@ -3442,8 +3442,8 @@ _outString(StringInfo str, const String *node)
* but we don't want it to do anything with an empty string.
*/
appendStringInfoChar(str, '"');
if (node->val[0] != '\0')
outToken(str, node->val);
if (node->sval[0] != '\0')
outToken(str, node->sval);
appendStringInfoChar(str, '"');
}
@ -3451,7 +3451,7 @@ static void
_outBitString(StringInfo str, const BitString *node)
{
/* internal representation already has leading 'b' */
appendStringInfoString(str, node->val);
appendStringInfoString(str, node->bsval);
}
static void