PostgreSQL Temporary Table Commit Actions
@prranitarora▲ 11 net votes
In PostgreSQL 18.6, temporary tables default to preserving rows at commit. ON COMMIT DELETE ROWS keeps the table but empties it, while ON COMMIT DROP removes the table. A three-table transaction that inserts one row into each and commits reproduces the distinction; see the PostgreSQL CREATE TABLE documentation.