UPSERT on view does not find constraint by name - Mailing list pgsql-hackers

From Jeremy Finzel
Subject UPSERT on view does not find constraint by name
Date
Msg-id CAMa1XUhaGQugY9yWboGXNzi+tefqC6YFmD0X04Sc8xNVQXunFw@mail.gmail.com
Whole thread Raw
Responses Re: UPSERT on view does not find constraint by name
List pgsql-hackers
I'm not sure if this can be considered a bug or not, but it is perhaps unexpected.  I found that when using a view that is simply select * from table, then doing INSERT ... ON CONFLICT ON CONSTRAINT constraint_name on that view, it does not find the constraint and errors out.  But it does find the constraint if one lists the columns instead.

I did not find any mention of this specifically in the docs, or any discussion on this topic after a brief search, and I have already asked my stakeholder to change to using the column list as better practice anyway.  But in any case, I wanted to know if this is a known issue or not.

Thanks!
Jeremy

pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Compressed pluggable storage experiments
Next
From: Julien Rouhaud
Date:
Subject: Non working timeout detection in logical worker