On Sun, Mar 1, 2026 at 7:55 AM Marcos Pegoraro <[email protected]> wrote:
> Em dom., 1 de mar. de 2026 às 11:29, David G. Johnston < > [email protected]> escreveu: > >> I can’t come up with a better header than Partial Mode. >> > > The problem is that if they conclude that there is no FILTER for that > aggregate, > they decide to run two queries, not the most readable or the most > performant one. > with Data as (select V from MyTable where F1 = 100) > select (select jsonb_agg(V) from Data) Total, > (select jsonb_agg(V) from MyTable where V>1) Filtered; > > I'm willing to entertain ideas, but for the proposed scenario I'm quite content to take the "not our problem" attitude here. As you say, it's suboptimal, not wrong. And it seems to me an unlikely real world outcome worth bending over backwards to accommodate based on theory alone. I'm much more amenable to trying to make clear that FILTER exists, and in the process point out how/that it differs from Partial Mode. David J.
