1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

Code review for recent TRUNCATE changes. Tighten relation-kind check,

tighten foreign-key check (a self-reference should not prevent TRUNCATE),
improve error message, cause a relation's TOAST table to be truncated
along with the relation.
This commit is contained in:
Tom Lane
2002-08-22 14:23:36 +00:00
parent b4f24fed7a
commit 0f1112923c
2 changed files with 27 additions and 15 deletions

View File

@ -27,7 +27,7 @@ SELECT * FROM truncate_a;
(1 row)
TRUNCATE truncate_a;
ERROR: TRUNCATE cannot be used as other tables reference this one via foreign key constraint $1
ERROR: TRUNCATE cannot be used as table truncate_b references this one via foreign key constraint $1
SELECT * FROM truncate_a;
col1
------