views:

379

answers:

2

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)

+1  A: 

If I understand correctly rowversion is the same as serial? If not - you'd have to make your own with triggers.

depesz
+1  A: 

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.

Ants Aasma