From c4cc2850f4d16092c2b7b39964c097260935a72c Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Fri, 14 Jan 2022 10:46:49 +0100 Subject: 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 Discussion: https://www.postgresql.org/message-id/flat/8c1a2e37-c68d-703c-5a83-7a6077f4f997@enterprisedb.com --- src/backend/commands/define.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/backend/commands/define.c') diff --git a/src/backend/commands/define.c b/src/backend/commands/define.c index 5bcb4b7b361..ce1a9df2688 100644 --- a/src/backend/commands/define.c +++ b/src/backend/commands/define.c @@ -58,7 +58,7 @@ defGetString(DefElem *def) case T_Integer: return psprintf("%ld", (long) intVal(def->arg)); case T_Float: - return castNode(Float, def->arg)->val; + return castNode(Float, def->arg)->fval; case T_String: return strVal(def->arg); case T_TypeName: @@ -201,7 +201,7 @@ defGetInt64(DefElem *def) * strings. */ return DatumGetInt64(DirectFunctionCall1(int8in, - CStringGetDatum(castNode(Float, def->arg)->val))); + CStringGetDatum(castNode(Float, def->arg)->fval))); default: ereport(ERROR, (errcode(ERRCODE_SYNTAX_ERROR), -- cgit v1.2.3