> I think we'd be better off casting this as a more generic "report the
> location of execution-time errors" issue. See previous discussions
> such as
>
> https://www.postgresql.org/message-id/flat/CAD3a31WR8X1TpjR_MoZxuz4S0BO3ZkPAeLoQ9rPxKHG%3D728eoQ%40mail.gmail.com
>
I havn't followed the referenced thread, sorry. At least it's clear that this is an issue that others have as well.
I totally agree with you that it would be nice to have a general solution for reporting such execution errors.