| From: | "Rick Schumeyer" <rschumeyer(at)ieee(dot)org> | 
|---|---|
| To: | pgsql-general(at)postgresql(dot)org | 
| Subject: | basic pg lock question | 
| Date: | 2005-02-02 16:07:57 | 
| Message-ID: | 2660.128.63.48.74.1107360477.squirrel@mail.agora-net.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | 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!
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Kleiser | 2005-02-02 16:11:12 | Re: When is a blank not a null or '' | 
| Previous Message | Tom Lane | 2005-02-02 15:56:06 | Re: Wierd memory problem with Apache / PHP. Related to |