Small. Fast. Reliable.
Choose any three.

upsert-clause

ON CONFLICT ( indexed-column ) WHERE expr DO , conflict target UPDATE SET column-name-list = expr WHERE expr NOTHING , column-name

Used by:   insert-stmt

References:   column-name-list   expr   indexed-column

See also:   lang_createtrigger.html   lang_insert.html   lang_upsert.html