Dean Rasheed <[email protected]> writes:
> Another option would be to print "y.a, OLD.a, t.b". Putting "OLD" in
> capitals, without double-quotes, makes it clear that it's a special
> keyword, and it can't clash with a table alias, because a capitalised
> table alias would be double-quoted.

Well, actually not, because EXPLAIN will double-quote it anyway:

 Update on public.t
   Output: y.a, "OLD".a, t.b

Still, this is probably an improvement on your previous suggestion.

But I think we are putting too much emphasis on this example.
Reality is that if the same alias is specified in both the rule and
the outer query, there is *nothing* we can print that won't be
ambiguous/confusing.  That's self-inflicted damage really, and
I'm not very impressed by the argument that two different people
might've written the rule and the query.  So I'd rather focus on
what happens when people avoid duplicate aliases, and make sure
that we print names that are as useful as possible in that case.

                        regards, tom lane


Reply via email to