Re: caching query results - Mailing list pgsql-general

From Nigel J. Andrews
Subject Re: caching query results
Date
Msg-id Pine.LNX.4.21.0305220800100.31215-100000@ponder.fairway2k.co.uk
Whole thread Raw
In response to Re: caching query results  ("alex b." <mailinglists1@gmx.de>)
List pgsql-general
List-Maintainers:

Seems to be an issue with the mailing list, it's very quiet for a while and
then there's quite a few messages turn up. In this instance
developers.postgresql.org keep hold of the message for a few hours and then
relay3.phsql.com kept hold for a while. Just so you know.

Now to the message:

On Wed, 21 May 2003, alex b. wrote:

> hello dear people without shaved necks!
>
> as many of you have already told me cursors are the way to go - now I know!
>
> there it is, kindly provided my BILL G.:
>
>    BEGIN;
>    DECLARE <cursorname> FOR <query>;
>    FETCH <number_of_rows> FROM <cursorname>;
>    MOVE {FORWARD|BACKWARD} <number_of_rows> IN <cursorname>;
>
>
> THANK YOU ALL VERY VIEL (much in german)!!!
>
> I will now have to implement session ID's into my CGI's...

I had a feeling you'd be doing something like that. I think cursors can't
remain open across a transaction close and definitely not across a connection
close. But I'll look forward to hearing the opposite.


> oh by the way... lets say a transaction has begun and was never
> commited.. what will happen to it?

It will rollback when the connection closes.

>
> is there a automatic rollback after a certain time?
> or would there be ton's of open transactions?

If the connection never closes then the transaction will remain in progress.


--
Nigel Andrews



pgsql-general by date:

Previous
From: Darko Prenosil
Date:
Subject: Re: caching query results
Next
From: Martijn van Oosterhout
Date:
Subject: Re: compiling mod_auth_pgsql