diff --git a/src/backend/parser/parse_coerce.c b/src/backend/parser/parse_coerce.c index b69d2bcc83e..b9058e9c76c 100644 --- a/src/backend/parser/parse_coerce.c +++ b/src/backend/parser/parse_coerce.c @@ -334,9 +334,11 @@ coerce_type(ParseState *pstate, Node *node, targetTypeMod, baseTypeMod, newcon, DatumGetCString(con->constvalue), ccontext, cformat, location); - if (result) /* runtimer error function returned */ + if (result) + { + ReleaseSysCache(baseType); return result; - + } /* * If the result is NULL, the newcon should be already updated properly. * Keep advancing the code.