Sure,
 
Entity Framework is an ORM for .Net (and .Net Core). It has different providers for different databases (NpgSql for Postgres). It uses Optimistic concurrency. The common use case is to use xmin as "concurrency token".
 
In code we make "var e = new Entity();", "dbContext.Add(e)" and "dbContext.SaveChanges()" (smth like that), and EF Core constructs sql for us, classical ORM;
 
When new row is inserted, EF makes an insert with "RETURNING xmin" to keep it as concurrency token for further updates (update is made like "where id = [id] AND xmin=[xmin]" to be sure the row hasn't been updated by other clients).
 
https://www.npgsql.org/efcore/modeling/concurrency.html
 
 
 
-- 
С уважением, Павел
 
 
 
11.08.2020, 20:22, "Andres Freund" <andres@anarazel.de>:

Hi,

On 2020-08-11 19:02:57 +0300, Pavel Biryukov wrote:

 I just want to point that Npgsql provider for .Net Core builds queries like
 that (RETURNING xmin) to keep track for concurrency.


Could you provide a bit more details about what that's actually used
for?

Regards,

Andres