# Disallow TRUNCATE on tables that are involved in referential
Bruce Momjian <bruce@momjian.us>
# Disallow TRUNCATE on tables that are involved in referential constraints The issue with finding and removing foreign key constraints is no longer an issue, so please apply the attached. It does NOT check for rules or on delete triggers (old style foreign keys) as those are difficult to deal with (remove, truncate, re-add). Rod Taylor
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/commands/tablecmds.c | modified | +35 −1 |
| src/test/regress/expected/truncate.out | added | +38 −0 |
| src/test/regress/parallel_schedule | modified | +1 −1 |
| src/test/regress/serial_schedule | modified | +2 −1 |
| src/test/regress/sql/truncate.sql | added | +17 −0 |