Fujii Masao <masao(dot)fujii(at)gmail(dot)com> writes:
> Codex reported me an issue where GIN scans can miss matching rows when
> methods are applied to a jsonpath predicate's result.
> SELECT * FROM t WHERE j @@ '($ == 1).size().boolean()';
This is related to one of the bugs I fixed in b28a2b2bf, but I think
it's different. I fear your patch might be too sweeping though ---
are you sure it doesn't reject cases that would be valid? I'd prefer
to inject the no-nextPos test on a per-node-type basis.
regards, tom lane