Re: Wrong results with references to JOIN USING aliases

From: Richard Guo <guofenglinux(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Wrong results with references to JOIN USING aliases
Date: 2026-11-09 07:14:42
Message-ID: CAMbWs4_Bjo-xM-BAqP-dP-e+=TcT=T46hux36OC6t5OJGAB0YQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Nov 7, 2026 at 11:51 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> BTW, I have a different issue with this query: it seems like "x"
> is just ROW(a), not ROW(a, t2.b, t3.b). It's late and I'm frazzled,
> but isn't that wrong?

As Tender said, I think this is intended. The SELECT doc says:

If a join_using_alias name is specified, it provides a table alias for
the join columns. Only the join columns listed in the USING clause are
addressable by this name.

So x.* gives just (a).

- Richard

In response to

Browse pgsql-hackers by date

  From Date Subject
Previous Message Chao Li 2026-11-09 07:12:25 Re: two statement_timeout race conditions