From: "Michael Vodep" <mvodep(at)gmx(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject:
Date: 2004-02-10 10:06:07
Message-ID: 9660.1076407567@www25.gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 +++

Browse pgsql-general by date

  From Date Subject
Next Message brynk 2004-02-10 11:18:11 Please help re function packaging...
Previous Message Jean-Michel POURE 2004-02-10 10:04:17 Re: I want to use postresql for this app, but...