PG Bug reporting form <noreply@postgresql.org> writes:
> [ NEW reference confuses check_agglevels_and_constraints ]
> triggers an assertion failure:
> TRAP: failed Assert("pstate->p_lateral_active"), File: "parse_agg.c", Line:
> 385, PID: 2785906
> Without asserts enabled, it fails with:
> ERROR: aggregate functions are not allowed in FROM clause of their own
> query level
Interesting. I'm inclined to just remove the Assert, since it's
evidently wrong and the ensuing error seems sufficiently on-point.
regards, tom lane