Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit b339a5c

Browse files
committed
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.
1 parent 67df978 commit b339a5c

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/backend/parser/parse_coerce.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ coerce_type(ParseState *pstate, Node *node,
245245
Oid baseTypeId;
246246
int32 baseTypeMod;
247247
int32 inputTypeMod;
248-
Type targetType;
248+
Type baseType;
249249
ParseCallbackState pcbstate;
250250

251251
/*
@@ -273,13 +273,13 @@ coerce_type(ParseState *pstate, Node *node,
273273
else
274274
inputTypeMod = -1;
275275

276-
targetType = typeidType(baseTypeId);
276+
baseType = typeidType(baseTypeId);
277277

278278
newcon->consttype = baseTypeId;
279279
newcon->consttypmod = inputTypeMod;
280-
newcon->constcollid = typeTypeCollation(targetType);
281-
newcon->constlen = typeLen(targetType);
282-
newcon->constbyval = typeByVal(targetType);
280+
newcon->constcollid = typeTypeCollation(baseType);
281+
newcon->constlen = typeLen(baseType);
282+
newcon->constbyval = typeByVal(baseType);
283283
newcon->constisnull = con->constisnull;
284284

285285
/*
@@ -300,11 +300,11 @@ coerce_type(ParseState *pstate, Node *node,
300300
* as CSTRING.
301301
*/
302302
if (!con->constisnull)
303-
newcon->constvalue = stringTypeDatum(targetType,
303+
newcon->constvalue = stringTypeDatum(baseType,
304304
DatumGetCString(con->constvalue),
305305
inputTypeMod);
306306
else
307-
newcon->constvalue = stringTypeDatum(targetType,
307+
newcon->constvalue = stringTypeDatum(baseType,
308308
NULL,
309309
inputTypeMod);
310310

@@ -319,7 +319,7 @@ coerce_type(ParseState *pstate, Node *node,
319319
targetTypeId,
320320
cformat, location, false, false);
321321

322-
ReleaseSysCache(targetType);
322+
ReleaseSysCache(baseType);
323323

324324
return result;
325325
}

0 commit comments

Comments
 (0)