On Wed, Nov 16, 2022 at 1:45 PM Ron Clarke <rclarkeai(at)gmail(dot)com> wrote:
> but I would have only expected this to affect the column being created by
> jsonb_path_query and not to remove the whole result set.
>
Except that is exactly what happens when a set-returning function is placed
into the target-list and it produces zero rows.
You should not place set-returning functions into the target-list. They,
like any other table, belong in the FROM clause. The LATERAL modifier was
created for just this purpose.
David J.