1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

Rename coerce_type() local variable.

coerce_type() has local variables named targetTypeId, baseTypeId, and
targetType.  targetType has been the Type structure for baseTypeId, so
rename it to baseType.
This commit is contained in:
Noah Misch
2015-05-02 16:46:23 -04:00
parent 67df9782e9
commit b339a5cf90

View File

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