Cursors and waiting users

Поиск
Список
Период
Сортировка
От Szcząchor Tomasz
Тема Cursors and waiting users
Дата
Msg-id 01beb278$73179ea0$020018ac@szczachor.zke.com.pl
обсуждение исходный текст
Ответы Re: [SQL] Cursors and waiting users
Список 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 по дате отправления:

Предыдущее
От: Nuchanard Chiannilkulchai
Дата:
Сообщение: automatic incrementation
Следующее
От: José Soares
Дата:
Сообщение: Re: [SQL] automatic incrementation