> I agree with Tom ... even the idea of a "TRUNCATE ALL" makes me nervous. If > we had such a feature, I'd advocate that it be superuser only.
This "superuser only" restriction certainly would be sensible.
> As for "TRUNCATE CASCADE" or similar improvements, I agree that they could be
> convenient ... but are easily worked around currently.
Agreed, workarounds are easy. The original suggestion of "TRUNCATE ALL" (or "TRUNCATE table CASCADE"), however, was motivated by the search for a simple and efficient truncation of all tables to accelerate unit-testing. Obviously, a plain "TRUNCATE" without arguments that truncates all tables would be dangerous, and in order to stay consistent with current psql syntax, I would say that an efficient "TRUNCATE table [CASCADE|RESTRICT]", with the "RESTRICT" option being the default, would be totally sufficient to satisfy the original motivation.
Another way to specify a safe but efficient "TRUNCATE ALL" command that might be easier to implement than above "TRUNCATE table [CASCADE|RESTRICT]" might be to implement the functionality of the originally suggested "TRUNCATE ALL" through a psql meta-command. Any suggestions for a safe syntax of such a "TRUNCATE ALL" meta-command? How about "\rtuples *"?
> So I wouldn't object to putting TRUNCATE CASCADE on the todo list, but > would argue that it be left to the people who asked for it to implement > it.
Before attempting to implementing any such extension, we would like to make sure that that extension would not be rejected by those of you who decide what goes into future versions of postgresql.
Yours, Andi.
---------------------------(end of broadcast)--------------------------- TIP 3: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly