Re: BUG #18608: Assert in check_agglevels_and_constraints() fails on creating a rule with aggr(NEW) in subselect - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #18608: Assert in check_agglevels_and_constraints() fails on creating a rule with aggr(NEW) in subselect
Date
Msg-id 3543320.1725995180@sss.pgh.pa.us
Whole thread Raw
In response to BUG #18608: Assert in check_agglevels_and_constraints() fails on creating a rule with aggr(NEW) in subselect  (PG Bug reporting form <noreply@postgresql.org>)
List pgsql-bugs
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



pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #18608: Assert in check_agglevels_and_constraints() fails on creating a rule with aggr(NEW) in subselect
Next
From: Karim Chaid
Date:
Subject: Re: BUG #18599: server closed the connection unexpectedly