Re: BUG #18307: system columns does not support using join - Mailing list pgsql-bugs

From David G. Johnston
Subject Re: BUG #18307: system columns does not support using join
Date
Msg-id CAKFQuwbpw_WhcB=w_MwUWjMGVYH=Hxr3bW0vOpbLH8QFMsgqxg@mail.gmail.com
Whole thread Raw
In response to BUG #18307: system columns does not support using join  (PG Bug reporting form <noreply@postgresql.org>)
Responses Re: BUG #18307: system columns does not support using join  (RekGRpth <rekgrpth@gmail.com>)
Re: BUG #18307: system columns does not support using join  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On Tuesday, January 23, 2024, PG Bug reporting form <noreply@postgresql.org> wrote:
The following bug has been logged on the website:

Bug reference:      18307
Logged by:          RekGRpth
Email address:      rekgrpth@gmail.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.
 

pgsql-bugs by date:

Previous
From: Christoph Berg
Date:
Subject: Re: Misleading/inaccurate error message from pg_basebackup
Next
From: "David G. Johnston"
Date:
Subject: Re: BUG #18295: In PostgreSQL a unique index on targeted columns is sufficient to support a foreign key