How to Create Global temporary tables in Azure Postgresql

Velmurugan 1 Reputation point

Hi Team,

Kindly provide us the steps to create Global temporary table for Azure database for postgresql. Currently we are using postgresql 13.

We are unable to create extension pgtt, getting error as could not open extension control file in postgresql. Kindly suggest on the same.

Azure Database for PostgreSQL
{count} votes

1 answer

Sort by: Most helpful
  1. Boris Von Dahle 3,121 Reputation points


    You're encountering this error because the extension isn't available in Azure Database for PostgreSQL.

    The extensive list can be found here :

    In terms of alternatives, you can't create truly "global" temporary tables in PostgreSQL in the same way you can in other RDBMS like SQL Server.

    If you need a temporary table that is shared across sessions, you'll likely need to create a regular table and manage access and cleanup manually.

    If you have a use case that requires global temporary tables, I would recommend reviewing your database architecture to see if there are different approaches you could take.