Re: Locking rows

Поиск
Список
Период
Сортировка
От Jonathan Bartlett
Тема Re: Locking rows
Дата
Msg-id Pine.GSU.4.44.0303010537170.9917-100000@eskimo.com
обсуждение исходный текст
Ответ на Re: Locking rows  (Jean-Christian Imbeault <jc@mega-bucks.co.jp>)
Список pgsql-general
>
> No. While I gather the data necessary to print a receipt I mark the
> invoice as non-cancellable.
>

Why don't you have two fields - non-cancellable and printed.

In transaction A, you mark everything you want to print as
non-cancellable.

In transaction B, you query for everything that is not printed AND
non-cancellable, and print it, and then update those same records as being
printed.

In addition, you probably want to turn on the maximum isolation level to
fully prevent rewriting records.

Jon

> In other words, I want to make invoices that have had receipts printed
> no longer cancellable.
>
> Jc
>


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

Предыдущее
От: Oliver Elphick
Дата:
Сообщение: Re: [ADMIN] Users and groups
Следующее
От: Detlef Jockheck
Дата:
Сообщение: Re: automatic creation of oid