As clarified in a separate thread this is not actually true. If the function only translates syntax between Elixir and SQL then only the equivalent SQL behaviour remains valid. PostgreSQL documentation says:
The optional
RETURNING
clause causesINSERT
to compute and return value(s) based on each row actually inserted (or updated, if anON CONFLICT DO UPDATE
clause was used)
This is consistent with results of my quick tests above: on_conflict: :nothing
prevents returning fields from the database as no rows are “actually inserted (or updated)”. Shall see if I can improve this section of the docs