On Jun 15, 5:15 pm, "C." <colin.mckin...@gmail.comwrote:
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.
I'm a little confused then. In my MySQL sites, I have an include at
the beginning of each page that connects to the MySQL server. I have
not had a problem connecting to temporary tables that I created on
other pages, which means that my access to them has persisted over
several 'mysql_connects'. Have I just been lucky that I maintained the
connection/session that had my temporary tables when I got a
connection from the pool? I just always happened to get the one that I
wanted?
However, in this postgres site that I am developing, I seem to lose my
connection to the temporary tables after I traverse another
pg_connect. I don't know if this is part of my php.ini, or what. But
it does seem to show different behavior between mysql_connect and
pg_connect.