Pablo Aviles
27/07/2002 10:58
|
To: Tom Lane <[EMAIL PROTECTED]> cc: Subject: Re: [BUGS] Bug #722: SELECT FOR UPDATE bugLink |
Hi,
we are use Postgresql 7.3.
The case in questions is: we have many clients (pc's) of postgresql. Every client try to block an employee to display at user. The user make change in the employee, but nobody can take the same employee at same time. Before changes, the next step is update the record (Record blocked)
But, when I use
> SELECT * FROM employees
> WHERE status = 'A'
> LIMIT 1
> FOR UPDATE;
to catch the employee, only the first user select a record. Other users can`t select any employee until the first user release the record. The first conclusion here, is that Postgresql block all employee table.
When we try to use the LOCK sentence, the result don´t have change.
regards,
Pablo Avilés Cisneros
Technology, ITS
Software Development Area
Technology, ITS
San José, Costa Rica
email: [EMAIL PROTECTED]
Tom Lane <[EMAIL PROTECTED]>
27/07/2002 09:58
|
To: [EMAIL PROTECTED], [EMAIL PROTECTED] cc: Subject: Re: [BUGS] Bug #722: SELECT FOR UPDATE bug |
[EMAIL PROTECTED] writes:
> SELECT * FROM employees
> WHERE status = 'A'
> LIMIT 1
> FOR UPDATE;
> The problem, in the previous sentence, is block every record on
> employees, although we want one record, we want limit 1.
I do not believe that. Could you give a more complete example of
your problem?
It would also help if you'd state which Postgres version you're using.
regards, tom lane