Transaction automatically rollback but why? - Mailing list pgsql-novice

From Muhammad Shariq Muzaffar
Subject Transaction automatically rollback but why?
Date
Msg-id 20030210093154.27113.qmail@web41103.mail.yahoo.com
Whole thread Raw
List 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

pgsql-novice by date:

Previous
From: Muhammad Shariq Muzaffar
Date:
Subject: lock timeout in pgsql 7.3.1
Next
From: greg@turnstep.com
Date:
Subject: Re: