Re: Practical Cursors - Mailing list pgsql-general

From Command Prompt, Inc.
Subject Re: Practical Cursors
Date
Msg-id Pine.LNX.4.30.0109171506350.4254-100000@commandprompt.com
Whole thread Raw
In response to Re: Practical Cursors  ("Joe Conway" <joseph.conway@home.com>)
List pgsql-general
> The downside I can see is that PHP would have no way to know when it could
> garbage-collect the allocated resource. So while it could be done, what
> would happen when the user closes their browser with your cursor still open?

Well, I thought of two things. One PostgreSQL could have some identifier
that was set by PHP, similar to a session ID that would have a time out.
Like a cookie timeout. If PostgreSQL did not receive a CLOSE or COMMIT
within that time limit, it would drop the transaction.

On the other hand, you could have it track the transaction so that the
next time I come back, if my identifier it matched to my session you could
code an application that will inform you of the transactions that you that
are not completed. Alas, that would be cool but would take a lot of code
on the PHP end.

The second thought I had was a small java applet that kept a live
connection to PostgreSQL and proxied certain things but that seems
extreme.

J

>
> -- Joe
>

--
--
by way of pgsql-general@commandprompt.com


pgsql-general by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: What is faster?
Next
From: Brett Schwarz
Date:
Subject: RRules using existing data