2011/6/2 Alexey Klyukin <al...@commandprompt.com>:

> What would you expect to happen for TRUNCATE .. CASCADE?
>
> One thing I find potentially surprising is that TRUNCATE CASCADE doesn't 
> follow the semantics of 'ON DELETE' clause for the foreign key, i.e. it would 
> truncate the dependent table even with ON DELETE RESTRICT foreign key. Do we 
> need a similar 'ON TRUNCATE'  FK clause?
>

Yes, cascade truncating taked place without ON DELETE RESTRICT
checking. No matter.
Either TRUNCATE must show message with full objects tree - correct
behavior like DROP, or TRUNCATE CASCADE should not delete anything
(strict constraint checking).

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Reply via email to