Re: BUG #18307: system columns does not support using join

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: "rekgrpth(at)gmail(dot)com" <rekgrpth(at)gmail(dot)com>, "pgsql-bugs(at)lists(dot)postgresql(dot)org" <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #18307: system columns does not support using join
Date: 2024-01-24 14:26:50
Message-ID: CAKFQuwbpw_WhcB=w_MwUWjMGVYH=Hxr3bW0vOpbLH8QFMsgqxg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tuesday, January 23, 2024, PG Bug reporting form <noreply(at)postgresql(dot)org>
wrote:

> The following bug has been logged on the website:
>
> Bug reference: 18307
> Logged by: RekGRpth
> Email address: rekgrpth(at)gmail(dot)com
> PostgreSQL version: 16.1
> Operating system: docker alpine
> Description:
>
> create table t(i int);
>
> explain (costs off) select * from t join t tt on t.xmin = tt.xmin;
> QUERY PLAN
> ---------------------------------
> Hash Join
> Hash Cond: (t.xmin = tt.xmin)
> -> Seq Scan on t
> -> Hash
> -> Seq Scan on t tt
> (5 rows)
>
> explain (costs off) select * from t join t tt using (xmin);
> ERROR: column "xmin" specified in USING clause does not exist in left
> table

I don’t this being worth the effort to change, and really seems like
completely expected behavior. “Select *” doesn’t output xmin, it requires
explicit table qualification to see it. This is the same thing.

David J.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message David G. Johnston 2024-01-24 14:40:54 Re: BUG #18295: In PostgreSQL a unique index on targeted columns is sufficient to support a foreign key
Previous Message Christoph Berg 2024-01-24 12:48:54 Re: Misleading/inaccurate error message from pg_basebackup