Skip to content

Commit

Permalink
Fix NULL input
Browse files Browse the repository at this point in the history
  • Loading branch information
robozmey committed Dec 2, 2024
1 parent effabb8 commit 378fa57
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions contrib/try_convert/try_convert.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ try_convert_via_io(Datum value, Oid sourceTypeId, Oid targetTypeId, bool *is_nul
Datum
try_convert(PG_FUNCTION_ARGS)
{
if (fcinfo->argnull[0]) {
PG_RETURN_NULL();
}

Oid sourceTypeId = get_fn_expr_argtype(fcinfo->flinfo, 0);
Oid targetTypeId = get_fn_expr_argtype(fcinfo->flinfo, 1);

Expand Down

0 comments on commit 378fa57

Please sign in to comment.