From: | Richard Huxton <dev(at)archonet(dot)com> |
---|---|
To: | Jean-Christian Imbeault <jc(at)mega-bucks(dot)co(dot)jp>, PostgreSQL-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Locking rows |
Date: | 2003-02-28 15:27:40 |
Message-ID: | 200302281527.40316.dev@archonet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Friday 28 Feb 2003 10:26 am, Jean-Christian Imbeault wrote:
> I have written an application that prints out data from a database. One
> problem I am encountering is in the time it takes to generate the print
> file the data may have changed.
>
> I was thinking that a way around this would be to lock the rows that are
> used to generate the print file. However I am not quite sure how to best
> go about this.
>
> Is locking the rows the best (or simplest) solution?
See the chapter "Concurrency Control" in the User Guide. Sounds like you want
to set transaction level to serializable - no explicit locking required.
This means that within your report-building transaction you don't see any
changes to the database (unless you do any within the transaction itself).
HTH
--
Richard Huxton
From | Date | Subject | |
---|---|---|---|
Next Message | Doug McNaught | 2003-02-28 15:48:09 | Re: Locking rows |
Previous Message | Neil Conway | 2003-02-28 15:10:54 | Re: 7.4? |