Transaction automatically rollback but why?

From: Muhammad Shariq Muzaffar <shariq77(at)yahoo(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Transaction automatically rollback but why?
Date: 2003-02-10 09:31:54
Message-ID: 20030210093154.27113.qmail@web41103.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi
I am using pgsql 7.3.1. I am trying to implement an
explicit lock at row level using FOR UPDATE with
SELECT query.

In current scenario I have 2 users. I have a table
'mytable' having a field 'std' with 6 records. First
user have got first 3 records locked and the second
user have locked the last 3 records. Now if the second
user try to lock a row which is already locked by the
first user, pgsql rollbacks the transaction for the
second user and unlock the records locked by the
second user. WHY????

Is there any way that pgsql gives only some error and
do not rollback the transaction.

thanx in advance.

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

Browse pgsql-novice by date

  From Date Subject
Next Message greg 2003-02-10 19:10:00 Re:
Previous Message Iandé Coutinho 2003-02-09 12:03:06 simple one