diff --git a/uri.c b/uri.c index 033d378..c665dcd 100644 --- a/uri.c +++ b/uri.c @@ -242,9 +242,10 @@ uri_path(PG_FUNCTION_ARGS) } uriFreeUriMembersA(&uri); - PG_RETURN_ARRAYTYPE_P(astate - ? makeArrayResult(astate, CurrentMemoryContext) - : construct_empty_array(TEXTOID)); + if (astate) + PG_RETURN_ARRAYTYPE_P(makeArrayResult(astate, CurrentMemoryContext)); + else + PG_RETURN_ARRAYTYPE_P(construct_empty_array(TEXTOID)); } static int