Re: Practical Cursors

From: "Command Prompt, Inc(dot)" <pgsql-general(at)commandprompt(dot)com>
To: Joe Conway <joseph(dot)conway(at)home(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Practical Cursors
Date: 2001-09-17 22:10:13
Message-ID: Pine.LNX.4.30.0109171506350.4254-100000@commandprompt.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)commandprompt(dot)com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Serguei Mokhov 2001-09-17 23:24:54 [OT] Re: MySQL development MUST immdediately cease - Due to GlobalEconomic condition..
Previous Message Doug McNaught 2001-09-17 21:57:16 Re: Left Joins