Re: BUG #18608: Assert in check_agglevels_and_constraints() fails on creating a rule with aggr(NEW) in subselect

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: exclusion(at)gmail(dot)com
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #18608: Assert in check_agglevels_and_constraints() fails on creating a rule with aggr(NEW) in subselect
Date: 2024-09-10 19:06:20
Message-ID: 3543320.1725995180@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

PG Bug reporting form <noreply(at)postgresql(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tomas Vondra 2024-09-10 19:20:53 Re: BUG #18598: AddressSanitizer detects use after free inside json_unique_hash_match()
Previous Message PG Bug reporting form 2024-09-10 18:00:01 BUG #18608: Assert in check_agglevels_and_constraints() fails on creating a rule with aggr(NEW) in subselect