PG Bug reporting form <noreply(at)postgresql(dot)org> writes:
> db=# explain SELECT generate_subscripts(ARRAY[]::integer[], 1) AS id,
> unnest(ARRAY[]::jsonb[]) ->> 'timestamp' AS timestamp
> FROM results
> JOIN groups ON groups.id = results.group_id
> WHERE results.search_id = 3336
> order by timestamp;
> The error is:
> ERROR: set-valued function called in context that cannot accept a set
> LINE 2: unnest(ARRAY[]::jsonb[]) ->> 'timestamp' AS timestam...
Hmm, that certainly seems like a bug, but I fear it's impossible
to investigate without a reproducible test case.
regards, tom lane