Re: cursors and sessions

From: "Aaron Bono" <postgresql(at)aranya(dot)com>
To: "chester c young" <chestercyoung(at)yahoo(dot)com>
Cc: "sql pgsql" <pgsql-sql(at)postgresql(dot)org>
Subject: Re: cursors and sessions
Date: 2008-03-13 23:04:39
Message-ID: bf05e51c0803131604k1dcebe8fo574cd218a3cd3e07@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Thu, Mar 13, 2008 at 5:54 PM, chester c young <chestercyoung(at)yahoo(dot)com>
wrote:

> is there any way to share a cursor between sessions?
>
> I have a costly query whose records need to be visited by in order by n
> number of concurrent sessions, and am unable to find the best way of
> doing this.
>
> I'd almost like to write a daemon that hands out the next record, but
> that's a royal pain to set up and maintain.
> <http://tools.search.yahoo.com/newsearch/category.php?category=shopping>
>

Why not pump your data into a table that mirrors the cursor and then create
a function that pops items off the top of this queuing table as needed by
the different sessions?

--
==================================================================
Aaron Bono
Aranya Software Technologies, Inc.
http://www.aranya.com
http://codeelixir.com
==================================================================

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Aarni Ruuhimäki 2008-03-14 13:04:54 Re: Counting days ...
Previous Message chester c young 2008-03-13 22:54:33 cursors and sessions