Robert Haas <robertmh...@gmail.com> writes: > I think that the issue here is simply that because both the updated > table and the "excluded" pseudo-table are visible here, and have the > same columns, an unqualified name is ambiguous. I don't really think > that it's worth documenting. The error message you get if you fail to > do it is actually pretty good:
> ERROR: column reference "b" is ambiguous > Now you could read that and not understand that the ambiguity is > between the target table and the "excluded" pseudo-table, for sure. Agreed. It doesn't help that there's no explicit use of "excluded" anywhere, as there is in more usual ambiguous-column cases. > What would probably help more is adding something like this to the > error message: > HINT: column "b" could refer to any of these relations: "foo", "excluded" +1, that seems like it could be handy across the board. regards, tom lane