By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,691 Members | 1,997 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,691 IT Pros & Developers. It's quick & easy.

Row versioning

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
"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.