Temporary tables and db connection

Is there a "Yii way" to work with temporary tables?

If I understand it correctly, the table should be there for the session. But if there is a new request, the temp tables are gone. Do I have to hold the connection somehow open and get this connection again or what does the trick here? I use postgresql, maybe there is a difference to other dbms.

I could set the connection to persistant, maybe that would help. But I am not yet sure if I want to do that.