1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-09 22:41:56 +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

@ -2745,16 +2745,16 @@ _copyA_Const(const A_Const *from)
switch (nodeTag(&from->val))
{
case T_Integer:
COPY_SCALAR_FIELD(val.ival.val);
COPY_SCALAR_FIELD(val.ival.ival);
break;
case T_Float:
COPY_STRING_FIELD(val.fval.val);
COPY_STRING_FIELD(val.fval.fval);
break;
case T_String:
COPY_STRING_FIELD(val.sval.val);
COPY_STRING_FIELD(val.sval.sval);
break;
case T_BitString:
COPY_STRING_FIELD(val.bsval.val);
COPY_STRING_FIELD(val.bsval.bsval);
break;
default:
elog(ERROR, "unrecognized node type: %d",
@ -4934,7 +4934,7 @@ _copyInteger(const Integer *from)
{
Integer *newnode = makeNode(Integer);
COPY_SCALAR_FIELD(val);
COPY_SCALAR_FIELD(ival);
return newnode;
}
@ -4944,7 +4944,7 @@ _copyFloat(const Float *from)
{
Float *newnode = makeNode(Float);
COPY_STRING_FIELD(val);
COPY_STRING_FIELD(fval);
return newnode;
}
@ -4954,7 +4954,7 @@ _copyString(const String *from)
{
String *newnode = makeNode(String);
COPY_STRING_FIELD(val);
COPY_STRING_FIELD(sval);
return newnode;
}
@ -4964,7 +4964,7 @@ _copyBitString(const BitString *from)
{
BitString *newnode = makeNode(BitString);
COPY_STRING_FIELD(val);
COPY_STRING_FIELD(bsval);
return newnode;
}