Lock vs Update

From: Chairudin Sentosa Harjo <chai(at)dnet(dot)net(dot)id>
To: pgsql-sql(at)postgreSQL(dot)org
Subject: Lock vs Update
Date: 1998-08-14 07:58:26
Message-ID: 35D3EE21.E24F5F49@dnet.net.id
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi all,

I have a question regarding lock.
I want to update a table, so I want to make sure nobody else
is trying to update the same table, that's why I use lock.

What is the meaning of the NOTICE when I update the "mytable" ?

#########################################
mytable=> begin;
BEGIN

mytable=>lock table mytable;
DELETE 0

update mytable set status='INVALID' where number=12;
NOTICE: (transaction aborted): queries ignored until END
*ABORT STATE*
#########################################

I can only update the "mytable" after I type:

#########################################
mytable=> end;
END

mytable=> update mytable set status='INVALID' where number=12;
UPDATE 1
##########################################

Regards
Chai

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message postgres 1998-08-14 13:43:16
Previous Message Karin Probost 1998-08-14 07:23:48 test subscribed