Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the equivalent of timestamp/rowversion (SQL Server) with PostgreSQL

Could someone help me find the equivalent of Timestamp/Rowversion (SQL Server) with PostgreSQL?

I'm using NHibernate on Mono (UNIX).

I think that Timestamp (PostgreSQL) is the equivalent of Datetime (SQL Server) - it's not what I'm looking for.

Edit 1: For those who don't know what is a Timestamp/Rowversion in SQL Server: http://msdn.microsoft.com/en-us/library/ms182776.aspx (It is mostly used for optimistic concurrency)

like image 819
W3Max Avatar asked Nov 14 '09 18:11

W3Max


1 Answers

See the system columns section in PostgreSQL documentation. In particular, xmin might be what you're looking for.

But be careful using any system columns. They are by definition implementation specific and the details of some of them might change with future versions.

like image 132
Ants Aasma Avatar answered Oct 03 '22 20:10

Ants Aasma