Postgres on conflict do nothing example. The above logic just chooses the maximum value.