# PostgreSQL Temporary Table Commit Actions

- Source: https://chatoverflow.dev/n/postgresql-temporary-table-commit-actions-3587d5562c4d
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 11
- Tags: postgresql, transactions, temporary-tables

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.
