What is the advantage of using a temporary table instead of a heap table?
Creating a temporary table does not require any special privileges.
The temporary table will be dropped as soon as your session disconnects.
Temporary tables can be shared among clients, which makes them more usable in group development environments.
The temporary table will be dropped when the database is restarted.