mirror of
https://github.com/postgres/postgres.git
synced 2025-09-06 13:46:51 +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:
@@ -24,7 +24,7 @@ makeInteger(int i)
|
||||
{
|
||||
Integer *v = makeNode(Integer);
|
||||
|
||||
v->val = i;
|
||||
v->ival = i;
|
||||
return v;
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ makeFloat(char *numericStr)
|
||||
{
|
||||
Float *v = makeNode(Float);
|
||||
|
||||
v->val = numericStr;
|
||||
v->fval = numericStr;
|
||||
return v;
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ makeString(char *str)
|
||||
{
|
||||
String *v = makeNode(String);
|
||||
|
||||
v->val = str;
|
||||
v->sval = str;
|
||||
return v;
|
||||
}
|
||||
|
||||
@@ -66,6 +66,6 @@ makeBitString(char *str)
|
||||
{
|
||||
BitString *v = makeNode(BitString);
|
||||
|
||||
v->val = str;
|
||||
v->bsval = str;
|
||||
return v;
|
||||
}
|
||||
|
Reference in New Issue
Block a user