Skip site navigation (1) Skip section navigation (2)

Re: Transaction vs. Savepoints

From: James Long <pgsql-novice(at)museum(dot)rain(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Transaction vs. Savepoints
Date: 2007-02-09 19:18:03
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
On Fri, Feb 09, 2007 at 11:21:59AM -0500, Tom Lane wrote:
> Usually the best approach is to fetch the data without acquiring any
> lock, allow the interactive editing to happen outside a transaction,
> then when the user hits SAVE, perform a transaction that locks the
> row(s), checks for conflicting changes, and commits if no conflict.

Might you please expand on how the application could check for
conflicting changes?  Would this be simply fetching the record 
again, and comparing to the previously-fetched version, to see
if the record is still as it was when the user started editing?
Something more sophisticated?

Thank you for your time.


In response to


pgsql-novice by date

Next:From: Daniel T. StaalDate: 2007-02-09 19:58:19
Subject: Re: Transaction vs. Savepoints
Previous:From: Tom LaneDate: 2007-02-09 16:42:38
Subject: Re: relation 12345 is still open

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group