PostgreSQL Temporary Table


Overview

In this tutorial, we will learn about a PostgreSQL temporary table and its usage. We will study the basic syntax and some examples to understand its functionality.

Definition

A PostgreSQL temporary table, as its name implies, is a table that exists for a given session and gets automatically dropped when the session is closed. The temporary table is specific to a given session and cannot be accessed from another session. A query from another session returns an error if it tries to access a temporary table created by a different session.

A few key features Of  temporary tables: