471,092 Members | 1,540 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,092 software developers and data experts.

Row versioning

Hi all,

has anyone implemented row versions/timestamps in PostgreSQL or any
thoughts on this?
Did I hit the right term? What I want to achieve is optimistic
concurrency beyound transaction boundaries. When retrieving data
I would also retrieve the row version and later on, in a different
transaction, before updating the data, I could check if was unchanged.
(row version at read time = row version at update time)

What are the pro's and con's about adding a "sequence" row that is
incremented by a trigger each time the row is updated?
Is having a timestamp row instand better?

Regards
Ruediger
--
Geschenkt: 3 Monate GMX ProMail + 3 Ausgaben der TV Movie mit DVD
++++ Jetzt anmelden und testen http://www.gmx.net/de/go/mail ++++
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 23 '05 #1
1 2803
"Ruediger Herrmann" <ru***************@gmx.de> writes:
has anyone implemented row versions/timestamps in PostgreSQL or any
thoughts on this?
Did I hit the right term? What I want to achieve is optimistic
concurrency beyound transaction boundaries. When retrieving data
I would also retrieve the row version and later on, in a different
transaction, before updating the data, I could check if was unchanged.


You could use the xmin system column for this.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Sandman | last post: by
reply views Thread by Jim Kerr | last post: by
3 posts views Thread by Alex Stevens | last post: by
2 posts views Thread by PatrickSA | last post: by
reply views Thread by Erik P. Vinther | last post: by
1 post views Thread by MrNobody | last post: by
3 posts views Thread by Modica82 | last post: by
1 post views Thread by betbubble | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.