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:
@ -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
|
||||
------
|
||||
|
Reference in New Issue
Block a user