Cursors and waiting users - Mailing list pgsql-sql

From Szcząchor Tomasz
Subject Cursors and waiting users
Date
Msg-id 01beb278$73179ea0$020018ac@szczachor.zke.com.pl
Whole thread Raw
Responses Re: [SQL] Cursors and waiting users
List pgsql-sql
Linux kernel : 2.0.36, postgresql-6.4.2.


Hello!

I run psql and begin command with transaction :
xxx=>begin work;
BEGIN
xxx=>declare kur1 cursor for select * from tab_name;

Then I run psql on second session and I try to insert something to this
table :

xxx=>insert into tab_name values ('something');

I can't finish this command until I close transaction on first session.
Why?
Does the declaring of cursor lock table for insert and I can't insert into
table? But I use cursor only for viewing of table.


Than,  if one user use cursor on the table, second one can't  insert data to
that table?

I am beginner in postgress. Help me find my mistakes.
(Sorry for my English).





pgsql-sql by date:

Previous
From: Nuchanard Chiannilkulchai
Date:
Subject: automatic incrementation
Next
From: José Soares
Date:
Subject: Re: [SQL] automatic incrementation