什么是时间戳/行版本(SQL Server)与 PostgreSQL 的等价物 [英] What is the equivalent of timestamp/rowversion (SQL Server) with PostgreSQL

查看:128
本文介绍了什么是时间戳/行版本(SQL Server)与 PostgreSQL 的等价物的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以帮我找到与 PostgreSQL 等效的 Timestamp/Rowversion (SQL Server) 吗?

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

我在 Mono (UNIX) 上使用 NHibernate.

I'm using NHibernate on Mono (UNIX).

我认为 Timestamp (PostgreSQL) 相当于 Datetime (SQL Server) - 这不是我想要的.

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

编辑 1:对于那些不知道什么是 SQL Server 中的时间戳/行版本的人:http://msdn.microsoft.com/en-us/library/ms182776.aspx(主要用于乐观并发)

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)

推荐答案

如果我理解正确 rowversion 与 串行?如果没有 - 您必须使用触发器制作自己的触发器.

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

这篇关于什么是时间戳/行版本(SQL Server)与 PostgreSQL 的等价物的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆