Re: BUG #16958: "Invalid reference to FROM-clause entry for table" when qualifying columns in "on conflict .. where" - Mailing list pgsql-bugs

From Peter Geoghegan
Subject Re: BUG #16958: "Invalid reference to FROM-clause entry for table" when qualifying columns in "on conflict .. where"
Date
Msg-id CAH2-Wz=uNJvUkbMhhwKZEOf=9vU=G7wSe6b0R_6SsrjkmMyQnw@mail.gmail.com
Whole thread Raw
In response to Re: BUG #16958: "Invalid reference to FROM-clause entry for table" when qualifying columns in "on conflict .. where"  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: BUG #16958: "Invalid reference to FROM-clause entry for table" when qualifying columns in "on conflict .. where"  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On Sat, Apr 10, 2021 at 9:28 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> It does seem like a pointless prohibition, but the comment about it in
> the source code implies it was intentional.  Peter, do you remember
> why?

No. The intention was to make it like CREATE INDEX. Apparently CREATE
INDEX allows the columns to be qualified, though, so that explanation
doesn't justify it.

There might have been a concern about users being confused about the
difference between what the INSERT docs call 'index_predicate' and
what they call 'condition' in the synopsis.

-- 
Peter Geoghegan



pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #16958: "Invalid reference to FROM-clause entry for table" when qualifying columns in "on conflict .. where"
Next
From: Tom Lane
Date:
Subject: Re: BUG #16958: "Invalid reference to FROM-clause entry for table" when qualifying columns in "on conflict .. where"