Pavel Stehule <stehule@kix.fsv.cvut.cz> writes:
> I played with some own old plpgsql functions. I found "error" in plpgsql
> 7.3. When I use TRUNCATE TABLE in function I get
> TRUNCATE TABLE cannot be executed from a function.
> In 7.2.2. I can use this command. Why, now I can't use truncate table?
This is a deliberate change for safety reasons: if your function errors
out after performing TRUNCATE, you are in big trouble.
If TRUNCATE is ever rewritten to be rollback-safe, we will remove the
restriction.
regards, tom lane