From: | "Juan Carlos Del Rio" <juancarlos(dot)delrio(at)tecnosoft(dot)com(dot)co> |
---|---|
To: | <pgsql-es-ayuda(at)postgresql(dot)org> |
Cc: | <pgsql-es-ayuda(at)postgresql(dot)org> |
Subject: | detectar bloqueo de una fila |
Date: | 2004-08-18 16:50:48 |
Message-ID: | 000c01c48543$833c80e0$8302000a@tecno.com.co |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-es-ayuda |
Hola Compañeros.
Como puedo detectar un bloqueo en un registro.
SESSION 1
#<base_de_datos>select id from tabla where id= id_registro for update;
#<base_de_datos>
Como pueden ver aqui se bloquea el registro y el shell me prepara para la siguiente instruccion con #<base_de_datos>
Seguidamente un usuario en otra sesion trata de bloquear ese registro
SESION 2
#<base_de_datos>update tabla set campo='xxx' where id= id_registro;
En esta sesion queda bloqueada la peticion, pero no me arroja ningun resultado...
NOTA: Necesito un mensage de respuesta para poder tomar una decision en el entorno WEB.
O mejor aun.... ¿ Como puedo detectar un bloqueo en un registro antes de hacer un update ?
From | Date | Subject | |
---|---|---|---|
Next Message | Leonel Nunez | 2004-08-18 17:11:14 | Re: detectar bloqueo de una fila |
Previous Message | Edwin Quijada | 2004-08-18 14:22:44 | Re: rel consulta uninitialized page 24 - fixing |