On Wed, 26 Jun 2024 at 12:18, Dean Rasheed <dean.a.rasheed@gmail.com> wrote:
>
> I've added a new elog() error check to
> adjust_appendrel_attrs_mutator(), similar to the existing one for
> varnullingrels, to report if we ever attempt to apply a non-default
> varreturningtype to a non-Var, which should never be possible, but
> seems worth checking. (non-Var expressions should only occur if we've
> flattened a UNION ALL query, so shouldn't apply to the target relation
> of a data-modifying query with RETURNING.)
>
New version attached, updating an earlier comment in
adjust_appendrel_attrs_mutator() that I had missed.
Regards,
Dean