Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

SELECT FOR UPDATE NOWAIT



If I do :
Session 1:
decibel=# begin;
BEGIN
decibel=# select * from i where i=1 for update nowait;
i
---
1
(1 row)

decibel=# begin;
BEGIN
decibel=# select * from i where i=2 for update nowait;
i
---
2
(1 row)

Session 2 :

decibel=# select * from i where i=1 for update nowait;
ERROR:  could not obtain lock on row in relation "i"
decibel=# select * from i where i=3 for update nowait;
ERROR: current transaction is aborted, commands ignored until end of transaction block
decibel=#  ==> Why ? :'(

Why i can't do any "Select for update" (current transaction aborted) after having receive a not obtain lock ???
Thank you for your answer !

_________________________________________________________________
Windows Live Messenger sur i-modeĀ™ : dialoguez avec vos amis depuis votre mobile comme sur PC ! http://mobile.live.fr/messenger/bouygues/




Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group