Hi all.
I'm looking forward to the appearance of LLL in PostgreSQL 6.5 and have a
question about the sensitivity of cursors in LLL.

In LLL cursors are INSENSITIVE as Oracle ?

Currently cursors are indeterminate and in some cases they are strangely
sensitive(for me).
In LLL the behavior of cursors will be more complicated, if changes by other
transactions can be seen by fetch statements(especially for read committed
isolation level).

I hope INSENSITIVE cursors to be implemented whose behavior we can predict
and I think that they can be realized according to proposals for LLL by
Vadim.

In LLL access methods return snapshot of data as they were in _some_ point
in time.
For read committed mode this moment is the time when statement began.
For serializable mode this is the time when current transaction began.

For a INSENSITIVE cursor this is the time when it was opened(declared),
not the time when the fetch statements for it began ?

Thanks.

Hiroshi Inoue
Inoue@tpf.co.jp



Mon, 5 Oct 1998 19:29:10 +0900
"Hiroshi Inoue" <Inoue@tpf.co.jp>
=?iso-2022-jp?B?Y3Vyc28bJEIjchsoQnMgaW4gTExM?=
Hiroshi Inoue wrote:
> 
> Hi all.
> I'm looking forward to the appearance of LLL in PostgreSQL 6.5 and have a
> question about the sensitivity of cursors in LLL.
> 
> In LLL cursors are INSENSITIVE as Oracle ?
> 
> Currently cursors are indeterminate and in some cases they are strangely
> sensitive(for me).

Do you mean seeing row inserted between fetches ?
Should this be changed ?
How is this in Oracle, Informix, Sybase, standards ?

> In LLL the behavior of cursors will be more complicated, if changes by other
> transactions can be seen by fetch statements(especially for read committed
> isolation level).
> 
> I hope INSENSITIVE cursors to be implemented whose behavior we can predict
> and I think that they can be realized according to proposals for LLL by
> Vadim.
> 
> In LLL access methods return snapshot of data as they were in _some_ point
> in time.
> For read committed mode this moment is the time when statement began.
> For serializable mode this is the time when current transaction began.
> 
> For a INSENSITIVE cursor this is the time when it was opened(declared),
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This is easy to implement.
But I'd like to know what standards say about cursor sensitivness...

> not the time when the fetch statements for it began ?

Thanks.

Vadim

Tue, 06 Oct 1998 10:07:18 +0800
Vadim Mikheev <vadim@krs.ru>
Re: [HACKERS] curso$B#r(Bs in LLL
>
> Hiroshi Inoue wrote:
> >
> > Hi all.
> > I'm looking forward to the appearance of LLL in PostgreSQL 6.5
> and have a
> > question about the sensitivity of cursors in LLL.
> >
> > In LLL cursors are INSENSITIVE as Oracle ?
> >
> > Currently cursors are indeterminate and in some cases they are strangely
> > sensitive(for me).
>
> Do you mean seeing row inserted between fetches ?

Yes and in some cases updated rows can be seen many times.

> Should this be changed ?

Yes,at least the option is necessary that changes can't be seen.

> How is this in Oracle, Informix, Sybase, standards ?
>

So far as I know,in Oracle cursors are fixed(logically) when
they are opened.

> > In LLL the behavior of cursors will be more complicated, if
> changes by other
> > transactions can be seen by fetch statements(especially for
> read committed
> > isolation level).
> >
> > I hope INSENSITIVE cursors to be implemented whose behavior we
> can predict
> > and I think that they can be realized according to proposals for LLL by
> > Vadim.
> >
> > In LLL access methods return snapshot of data as they were in
> _some_ point
> > in time.
> > For read committed mode this moment is the time when statement began.
> > For serializable mode this is the time when current transaction began.
> >
> > For a INSENSITIVE cursor this is the time when it was opened(declared),
>                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> This is easy to implement.
> But I'd like to know what standards say about cursor sensitivness...
>

In SQL92,cursors are not necessarily INSENSITIVE and there's the option
INSENSITIVE for DECLARE CURSOR statements.

Thanks.

Hiroshi Inoue
Inoue@tpf.co.jp


Tue, 6 Oct 1998 12:01:50 +0900
"Hiroshi Inoue" <Inoue@tpf.co.jp>
RE: [HACKERS] cursors in LLL