basic pg lock question

Поиск
Список
Период
Сортировка
От Rick Schumeyer
Тема basic pg lock question
Дата
Msg-id 2660.128.63.48.74.1107360477.squirrel@mail.agora-net.com
обсуждение исходный текст
Ответы Re: basic pg lock question  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: basic pg lock question  (Richard Huxton <dev@archonet.com>)
Re: basic pg lock question  (Scott Marlowe <smarlowe@g2switchworks.com>)
Список pgsql-general
I have a question about whether or not I need to do locking to a pg
table being accessed from a php application.

Let's say two users select rows from the table and display them in
their browser.  User A clicks on row 1 to edit it.  Since this is php,
so far it just selects the current values from the row.  Eventually,
user A will submit his changes and update the row.

In the meantime, when User B looks at his web page, there will still
be an 'edit' link for row 1.  I'm pretty sure that I don't want User B
to try to edit the row, but as far as I understand the default postgres
locking will not prevent this.  When user A selects row 1, do I need to
manually lock the row to prevent another select?

I'm sorry if this is basic stuff!

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

Предыдущее
От: Michael Kleiser
Дата:
Сообщение: Re: When is a blank not a null or ''
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: PostgreSQL on cluster