On Thu, Oct 22, 2026 at 10:52:28AM +0000, Staroverov Ilja wrote:
> 0001 fixes all of them in the new tests, for example:
errmsg("cannot cast behavior expression of type %s to %s",
format_type_be(exprType(expr)),
format_type_be(returning->typid)),
- parser_errposition(pstate, exprLocation(expr)));
+ parser_errposition(pstate, location));
While looking at v5-0001, I have been puzzled by this piece, because
it is actually not reachable with any normal means or even SQL.
Anyway, I get that Amit wanted this part to be defensive, so your
suggestion of using the behavior's location sounds good to me.
Applied this part.
--
Michael