pgtt
Extension to add Global Temporary Tables feature to PostgreSQL
Overview
| ID | Extension | Bin | Lib | Load | Create | Trust | Reloc | Schema |
|---|---|---|---|---|---|---|---|---|
| 9110 | pgtt | No | Yes | Yes | Yes | No | No | pgtt_schema |
Version
| Type | Repo | Version | PG Ver | Package | Deps |
|---|---|---|---|---|---|
| EXT | PGDG | 4.6 | 1817161514 | pgtt | - |
| RPM | PGDG | 4.6 | 1817161514 | pgtt_$v | - |
| DEB | PGDG | 4.6 | 1817161514 | postgresql-$v-pgtt | - |
Install
You can install pgtt directly. First, make sure the PGDG repository is added and enabled:
Install the extension using pig or apt/yum/dnf:
Install
pig
dnf
apt
Preload:
Create Extension:
Usage
pgtt: Extension to add Global Temporary Tables feature to PostgreSQL
Creating a Global Temporary Table
The GLOBAL keyword can also be used as a comment to avoid warnings:
CREATE AS Form
Using Global Temporary Tables
Creating Indexes
Constraints
All constraints except FOREIGN KEYS are supported:
Dropping
Configuration
Key Behaviors
- GTT content is session-local; other sessions cannot see your data
- The table structure is persistent (visible to all users), but data is per-session
- Requires loading via
session_preload_libraries = 'pgtt' - Partitioning is not supported on GTTs
Was this page helpful?
Thanks—your feedback helps us improve this page.
What got in the way? (optional)