Rename coerce_type() local variable.
authorNoah Misch
Sat, 2 May 2015 20:46:23 +0000 (16:46 -0400)
committerNoah Misch
Sat, 2 May 2015 20:46:23 +0000 (16:46 -0400)
coerce_type() has local variables named targetTypeId, baseTypeId, and
targetType.  targetType has been the Type structure for baseTypeId, so
rename it to baseType.

src/backend/parser/parse_coerce.c

index a4e494be7a2ad4faa4651c270884e464d43b6ff4..f6e7be4e71020b699f6c7721e0bb0c9bf3cfb79f 100644 (file)
@@ -245,7 +245,7 @@ coerce_type(ParseState *pstate, Node *node,
        Oid         baseTypeId;
        int32       baseTypeMod;
        int32       inputTypeMod;
-       Type        targetType;
+       Type        baseType;
        ParseCallbackState pcbstate;
 
        /*
@@ -273,13 +273,13 @@ coerce_type(ParseState *pstate, Node *node,
        else
            inputTypeMod = -1;
 
-       targetType = typeidType(baseTypeId);
+       baseType = typeidType(baseTypeId);
 
        newcon->consttype = baseTypeId;
        newcon->consttypmod = inputTypeMod;
-       newcon->constcollid = typeTypeCollation(targetType);
-       newcon->constlen = typeLen(targetType);
-       newcon->constbyval = typeByVal(targetType);
+       newcon->constcollid = typeTypeCollation(baseType);
+       newcon->constlen = typeLen(baseType);
+       newcon->constbyval = typeByVal(baseType);
        newcon->constisnull = con->constisnull;
 
        /*
@@ -300,11 +300,11 @@ coerce_type(ParseState *pstate, Node *node,
         * as CSTRING.
         */
        if (!con->constisnull)
-           newcon->constvalue = stringTypeDatum(targetType,
+           newcon->constvalue = stringTypeDatum(baseType,
                                            DatumGetCString(con->constvalue),
                                                 inputTypeMod);
        else
-           newcon->constvalue = stringTypeDatum(targetType,
+           newcon->constvalue = stringTypeDatum(baseType,
                                                 NULL,
                                                 inputTypeMod);
 
@@ -319,7 +319,7 @@ coerce_type(ParseState *pstate, Node *node,
                                      targetTypeId,
                                      cformat, location, false, false);
 
-       ReleaseSysCache(targetType);
+       ReleaseSysCache(baseType);
 
        return result;
    }