Re: [SQL] Stepping through a table.

From: Herouth Maoz <herouth(at)oumail(dot)openu(dot)ac(dot)il>
To: Matthew Hagerty <matthew(at)venux(dot)net>, pgsql-sql(at)postgreSQL(dot)org
Subject: Re: [SQL] Stepping through a table.
Date: 1999-08-17 11:13:34
Message-ID: l03130301b3def3e8f07a@[147.233.159.109]
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Pham, Thinh 1999-08-17 13:18:55 RE: [SQL] datediff function
Previous Message Herouth Maoz 1999-08-17 11:05:02 Re: [SQL] datediff function