Re: Locking rows

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Locking rows
Дата
Msg-id 200302281527.40316.dev@archonet.com
обсуждение исходный текст
Ответ на Locking rows  (Jean-Christian Imbeault <jc@mega-bucks.co.jp>)
Список 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

В списке pgsql-general по дате отправления:

Предыдущее
От: Neil Conway
Дата:
Сообщение: Re: 7.4?
Следующее
От: Neil Conway
Дата:
Сообщение: Re: Locking rows