"INSERT ON CONFLICT UPDATE" - Use of indexes ?

From: Laura Smith <n5d9xq3ti233xiyif2vp(at)protonmail(dot)ch>
To: postgre <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: "INSERT ON CONFLICT UPDATE" - Use of indexes ?
Date: 2020-06-08 12:42:29
Message-ID: D7XeBgJlPCvQJTomQlRtQ9xXe12qS4v-wYACle-TpfLfsbsdCWd_7SXqFOPJdpiW444JlClvQkREVxJyUA_Avy6BCASy7sDxDOshXw6a8Es=@protonmail.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

What'st the current state of play with indexes and ON CONFLICT ?  The docs seem to vaguely suggest it is possible, but this SO question (https://stackoverflow.com/questions/38945027/) seems to suggest it is not.

I've got a unique named index on a table (i.e. "create unique index xyz...") but I cannot seem to be able to refer to it in a function ?
ON CONFLICT (index_name) .... : does not work
ON CONFLICT ON CONSTRAINT index_name....: does not work

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron 2020-06-08 13:07:04 Re: When to use PARTITION BY HASH?
Previous Message Laura Smith 2020-06-08 12:21:32 Re: Postgres 12 RLS