Marko Tiikkaja <marko.tiikkaja@cs.helsinki.fi> writes:
> Tom Lane wrote:
>> if (query->returningList)
>> cteList = query->returningList;
>> else
>> cteList = query->targetList;
> My initial thought is that this won't work because there might not be a
> RETURNING clause, but I'm not sure.
Hm, would we allow DML without RETURNING in CTEs? I'm not sure I see
the point of that. But in any case, the other way is fine.
regards, tom lane