# 概述 pgtt是PostgreSQL的一个插件,可以用来兼容创建、管理和使用Oracle风格的全局临时表。 > pgtt is a PostgreSQL extension to create, manage and use Oracle-style Global Temporary Tables and the others RDBMS. pgtt作者写的说明blog:[Global Temporary Table in PostgreSQL](https://www.migops.com/blog/2021/06/16/global-temporary-table-in-postgresql/) # 项目 项目地址:[https://github.com/darold/pgtt](https://github.com/darold/pgtt) 作者主页:[https://www.migops.com](https://www.migops.com) # 示例 ```sql CREATE GLOBAL TEMPORARY TABLE a_gtt_table ( id integer PRIMARY KEY, lbl text NOT NULL, creation_date timestamp CHECK (creation_date > '2021-01-01') ) ON COMMIT PRESERVE ROWS; ``` # openGauss支持全局临时表 [opengauss1.0.1部分新特性测试](https://www.modb.pro/db/35175) # 参考 - [PostgreSQL全局临时表(pgtt)——兼容oracle](https://blog.csdn.net/weixin_39540651/article/details/107491290)