Recommended practice to check if row was updated

The INSERT ON CONFLICT statement doesnt support RETURNING any values.

However a lot of times one needs to know if the INSERT statement resulted in a new row being created or an update to an existing row.

Considering this, is there any plan to add RETURNING feature for INSERT ON CONFLICT (and UPSERT) statements ?

What is the current recommended way to check for this?

@pdeva we have an open issue for this that you can take a look at here: https://github.com/cockroachdb/cockroach/issues/6637

Currently, you have to just do a read after write, although we’ve bumped up priority on this given your feedback.

one thing the postgres implementation does do is provide any way of returning if a row was inserted or updated. there are multiple hacks on stackoverflow which use postgres internals to return this info.
it would be great if your implementation took care of this