Tom Lane wrote:
> Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> > Tom Lane wrote:
> >> But if I read SQL99 correctly, only referencing not referenced
> >> columns are supposed to be shown.
> >
> > It is supposed to show the referenced (primary key) columns.
>
> [ reads spec more carefully... ] Yeah, I think you are right.
> We are going to need a separate UNION arm for the foreign-key case.
Fixed. The union branch was already trying to differentiate between
primary key and foreign key when joining the columns, but not when
joining the tables. Just a thinko.