>
> On Mon, Feb 24, 2003 at 07:53:05PM +0000, Darko Prenosil wrote:
> >     I need two answers I did not find in documentation :
> > How can I get exact number of rows in DECLARED CURSOR ?
> > OK, I can FETCH until NULL, but this does not fits my needs !
You may want to use FETCH ALL, otherwise what or your needs in detail?
>
> You need to move to the end of the cursor. When you declare a cursor
it
> doesn't run the query yet. You have to tell it to run the query before
it
> can tell you how many rows it is. I think the command is MOVE.
>
But how could one MOVE to the last row?

> How can I get information is TRANSACTION already started ?
> (TRANSACTION LEVEL)
>
Either
SHOW TRANSACTION ISOLATION LEVEL ;
NOTICE:  TRANSACTION ISOLATION LEVEL is READ COMMITTED
SHOW VARIABLE
or
select current_setting('TRANSACTION ISOLATION LEVEL');

Regards, Christoph



Tue, 25 Feb 2003 10:28:04 +0100
Christoph Haller <ch@rodos.fzk.de>
Re: I cant find it or I'm just lazy ?
On Tuesday 25 February 2003 09:28, Christoph Haller wrote:
> > On Mon, Feb 24, 2003 at 07:53:05PM +0000, Darko Prenosil wrote:
> > >     I need two answers I did not find in documentation :
> > > How can I get exact number of rows in DECLARED CURSOR ?
> > > OK, I can FETCH until NULL, but this does not fits my needs !
>
> You may want to use FETCH ALL, otherwise what or your needs in detail?
>
> > You need to move to the end of the cursor. When you declare a cursor
>
> it
>
> > doesn't run the query yet. You have to tell it to run the query before
>
> it
>
> > can tell you how many rows it is. I think the command is MOVE.
>
> But how could one MOVE to the last row?
>
> > How can I get information is TRANSACTION already started ?
> > (TRANSACTION LEVEL)
>
> Either
> SHOW TRANSACTION ISOLATION LEVEL ;
> NOTICE:  TRANSACTION ISOLATION LEVEL is READ COMMITTED
> SHOW VARIABLE
> or
> select current_setting('TRANSACTION ISOLATION LEVEL');
>
> Regards, Christoph


I did not mean 'TRANSACTION ISOLATION LEVEL', but 'TRANSACTION LEVEL' !
OK, it is bad construction - my fault !
What I meant is : IS-TRANSACTION-ALREADY-STARTED ?
I used 'TRANSACTION LEVEL' because I saw that Bruce is working on nested 
transactions, so in future there could be more than one transaction started ?

	Thanks for Your reply !



Tue, 25 Feb 2003 11:14:10 +0000
Darko Prenosil <darko.prenosil@finteh.hr>
Re: I cant find it or I'm just lazy ?
On Tuesday 25 February 2003 09:28, Christoph Haller wrote:
> > On Mon, Feb 24, 2003 at 07:53:05PM +0000, Darko Prenosil wrote:
> > >     I need two answers I did not find in documentation :
> > > How can I get exact number of rows in DECLARED CURSOR ?
> > > OK, I can FETCH until NULL, but this does not fits my needs !
>
> You may want to use FETCH ALL, otherwise what or your needs in detail?
>
If I use FETCH ALL all, all the data will be sent to client, then why to use 
CURSOR at all ? I need to reduce network trafic on slow connections !

Regards !

Tue, 25 Feb 2003 12:47:56 +0000
Darko Prenosil <darko.prenosil@finteh.hr>
Re: I cant find it or I'm just lazy ?