- Mailing list pgsql-general

From Michael Vodep
Subject
Date
Msg-id 9660.1076407567@www25.gmx.net
Whole thread Raw
List pgsql-general
Hi!
I have a table called "tbltest". There i want to avoid multiple updates at
the same time. so i tried to use the transaction method.
transaction 1                                              transaction 2
BEGIN;
SET TRANSACTION ISOLATION LEVEL
SERIALIZABLE;
SELECT * FROM tbltest WHERE id=0
FOR UPDATE;
                                                                 UPDATE
tbltest SET col1='test' WHERE id=0;

The update statement (transaction 2) waits, until i commited the transaction
1. How can i avoid this waiting? is it possible to get an error like "ERROR:
 id 0 is currently not available" - or somethink like this :-)

Thanks!!!
Michael

--
GMX ProMail (250 MB Mailbox, 50 FreeSMS, Virenschutz, 2,99 EUR/Monat...)
jetzt 3 Monate GRATIS + 3x DER SPIEGEL +++ http://www.gmx.net/derspiegel +++


pgsql-general by date:

Previous
From: "William ZHANG"
Date:
Subject: Re: pg_class and relfilenode
Next
From: steven_c_job@yahoo.com (Steven job)
Date:
Subject: Best replication options