On Mon, Sep 4, 2023 at 10:35 PM Andy Fan <zhihui.fan1213@gmail.com> wrote:
>
> Hi,
>
> v13 attached. Changes includes:
>
> 1. fix the bug Jian provides.
> 2. reduce more code duplication without DirectFunctionCall.
> 3. add the overlooked jsonb_path_query and jsonb_path_query_first as candidates
>
>
> --
> Best Regards
> Andy Fan
based on v13.
IMHO, it might be a good idea to write some comments on
jsonb_object_field_internal. especially the second boolean argument.
something like "some case, we just want return JsonbValue rather than
Jsonb. to return JsonbValue, make as_jsonb be false".
I am not sure "jsonb_object_field_start" is a good name, so far I only
come up with "jsonb_object_field_to_jsonbvalues".
linitial(jsonb_start_func->args) =
makeRelabelType(linitial(jsonb_start_func->args),
INTERNALOID, 0,
InvalidOid,
COERCE_IMPLICIT_CAST);
if no need, output typmod (usually -1), so here should be -1 rather than 0?
list_make2(jsonb_start_func, makeConst(.....). you can just combine
two different types then make a list, seems pretty cool...