|
Posted by C. on 06/15/07 21:15
On 15 Jun, 15:53, lawp...@gmail.com wrote:
> I'm implementing some temporary tables, which I understand are
> destroyed automatically at the end of the session. It seems to me
> that
> when I navigate to a new page, or re-load my existing page, I lose my
> temporary tables. Is this because I am creating a new session at the
> beginning of each page with my pg_connect include?
>
I'm not specifically familiar with PostgreSQL, but persistent
connections are not going to solve your problem - connections are held
in a pool and allocated on a first come, first served basis - there's
no reason to expect that your PHP session will connect back to the
same DBMS session.
> Also, are temporary tables globally visible, or only within that
> session? I mean, can one user see another user's temporary tables?
They should only be visible within the current DBMS session - whether
persistent connections preserve the DBMS session....I don't know, but
(see above) the question is somewhat academic.
One solution would be to create a real table using a session
identifier (e.g. PHP session id) in the name. Of course you'd need to
handle the clean up from your own session handler.
HTH
C.
Navigation:
[Reply to this message]
|