pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Szcząchor Tomasz <tszczachor@zke.com.pl>
To: postgres <pgsql-sql@postgresql.org>
Subject: Cursors and waiting users
Date: Wed, 9 Jun 1999 15:03:20 +0200
Message-ID: <01beb278$73179ea0$020018ac@szczachor.zke.com.pl> (raw)

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).






view thread (2+ messages)  latest in thread

Message-ID: <01beb278$73179ea0$020018ac@szczachor.zke.com.pl>
Permalink:  ../01beb278$73179ea0$020018ac@szczachor.zke.com.pl/
Also on:    postgresql.org/message-id/01beb278$73179ea0$020018ac@szczachor.zke.com.pl

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: tszczachor@zke.com.pl
  Subject: Re: Cursors and waiting users
  In-Reply-To: <01beb278$73179ea0$020018ac@szczachor.zke.com.pl>
  References: <01beb278$73179ea0$020018ac@szczachor.zke.com.pl>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox