From: Herouth Maoz <herouth@oumail.openu.ac.il>
To: Matthew Hagerty <matthew@venux.net>
To: pgsql-sql@postgreSQL.org
Subject: Re: [SQL] Stepping through a table.
Date: Tue, 17 Aug 1999 14:13:34 +0300
Message-ID: <l03130301b3def3e8f07a@[147.233.159.109]> (raw)
In-Reply-To: <4.1.19990816164740.00c9fda0@mail.venux.net>
References: <l03130300b3dd85696085@[147.233.159.109]>
<4.1.19990815225433.00cb6c20@mail.venux.net>
At 23:52 +0300 on 16/08/1999, Matthew Hagerty wrote:
>
> You mentioned that cursors are read only. Can I do update statements while
> navigating with cursors? Or do they lock the records they are reading?
If they do, they only lock them to other transactions. Since you are within
the same connection and thus the same transaction (cursors can only be used
within BEGIN/END transaction blocks), of course the records are not locked.
As far as I know, you can make update statements. What I am not sure about
is what happens if you rewind the cursor and read the updated record again
- whether you will see the updated record or the non-updated one. You'll
have to test this.
Herouth
--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma
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: herouth@oumail.openu.ac.il, matthew@venux.net
Subject: Re: [SQL] Stepping through a table.
In-Reply-To: <l03130301b3def3e8f07a@[147.233.159.109]>
References: <l03130300b3dd85696085@[147.233.159.109]> <4.1.19990815225433.00cb6c20@mail.venux.net> <l03130301b3def3e8f07a@[147.233.159.109]>
* 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