From: John DeSoi <desoi@pgedit.com>
To: Kaloyan Iliev <news1@faith.digsys.bg>
Cc: pgsql-performance@postgresql.org
Subject: Re: CURSOR OR OFFSET/LIMIT
Date: Thu, 6 Apr 2006 13:11:33 -0400
Message-ID: <E64B184B-0661-461D-A478-904FCBA00F24@pgedit.com> (raw)
In-Reply-To: <44352A25.7010107@faith.digsys.bg>
References: <44352A25.7010107@faith.digsys.bg>
On Apr 6, 2006, at 10:48 AM, Kaloyan Iliev wrote:
> If I use cursors it's better but my problem is that cursors live
> only in the current transaction.
> So when the Web Server finish I've lost the transaction and the
> cursor.
Cursors can live outside the transaction if you declare them WITH
HOLD specified. But that still may not help you in a web environment
if you want to break the results into pages served on separate
requests (and possibly different connections).
http://www.postgresql.org/docs/8.1/interactive/sql-declare.html> Is there a way to save the cursor between separe Browser request
> (and to give it time to live)?
Sure, but you need to add a lot of connection management to do this.
You would need to keep track of the cursors and make sure a
subsequent request uses the right connection.
John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL
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-performance@postgresql.org
Cc: desoi@pgedit.com, news1@faith.digsys.bg
Subject: Re: CURSOR OR OFFSET/LIMIT
In-Reply-To: <E64B184B-0661-461D-A478-904FCBA00F24@pgedit.com>
References: <44352A25.7010107@faith.digsys.bg> <E64B184B-0661-461D-A478-904FCBA00F24@pgedit.com>
* 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