Improving upserts in Ecto and PostgreSQL

from blog katafrakt’s garden, | ↗ original
Upserting is a very useful technique for working with databases. One of the most common use cases is when you are mirroring data from a different data source (different database or an API, for example) in your application’s local database. Ecto supports it quite well and has a dedicated section of its documentation about it. However, I found this...