"David G. Johnston" <david.g.johnston@gmail.com> writes:
> I was actually wondering why the error wasn’t an ambiguous column name
> error. For a pure select query we already allow duplicate column names in
> the result.
To get an "ambiguous column name" error, there'd need to be multiple
*accessible* names, not multiple inaccessible ones. Although I concede
your point that maybe we could adjust the "does not exist" phraseology
too. Maybe something like "column foo is not available"?
regards, tom lane