# Disallow TRUNCATE on tables that are involved in referential
authorBruce Momjian <bruce@momjian.us>
Thu, 22 Aug 2002 04:51:06 +0000 (04:51 +0000)
committerBruce Momjian <bruce@momjian.us>
Thu, 22 Aug 2002 04:51:06 +0000 (04:51 +0000)
commit47b37a6bfaa073076c8607cdd4f65ddd569aaefa
tree289bf3468cc05ff203e5bad9abd14fa26113a9a1
parentdac22ee43c841768900afbe5b7e697f0c515d2e0
# 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
src/backend/commands/tablecmds.c
src/test/regress/expected/truncate.out [new file with mode: 0644]
src/test/regress/parallel_schedule
src/test/regress/serial_schedule
src/test/regress/sql/truncate.sql [new file with mode: 0644]