summaryrefslogtreecommitdiff
path: root/src/backend/parser/parse_coerce.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/parser/parse_coerce.c')
-rw-r--r--src/backend/parser/parse_coerce.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/backend/parser/parse_coerce.c b/src/backend/parser/parse_coerce.c
index a59be052a7..42227a0530 100644
--- a/src/backend/parser/parse_coerce.c
+++ b/src/backend/parser/parse_coerce.c
@@ -252,7 +252,7 @@ coerce_type(ParseState *pstate, Node *node,
Oid baseTypeId;
int32 baseTypeMod;
int32 inputTypeMod;
- Type targetType;
+ Type baseType;
ParseCallbackState pcbstate;
/*
@@ -280,13 +280,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;
/*
@@ -307,11 +307,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);
@@ -326,7 +326,7 @@ coerce_type(ParseState *pstate, Node *node,
targetTypeId,
cformat, location, false, false);
- ReleaseSysCache(targetType);
+ ReleaseSysCache(baseType);
return result;
}