On Wed, 21 Oct 2026 at 22:43, Tom Lane <[email protected]> wrote:
>
> (If this is in fact rare, and it probably is given that the manual
> deprecates RETURNING WITH in rules, then it's likely not worth
> the trouble to try to fix the query representation to keep the
> aliases separate.)

Agreed.

Actually, I don't think that this is a problem with the query
representation. It's a problem with the output text format used in
EXPLAIN. Changing the query representation won't make that problem go
away -- a query like this may end up with a returning list containing
a mix of Var's with different VarReturningType's some of which came
from the triggering query, and some from the rule action, and simply
outputting "alias.colname" isn't enough to distinguish between them. I
think you'd have to output something like "new(tbl.colname)", which
would be different from "new.column" and "tbl.colname",

Regards,
Dean


Reply via email to