"Alain Lavigne" <alavigne(at)zaq(dot)com> writes:
> Using the function pgstatuple I want to use this to control what gets
> vacuumed.
You can't run VACUUM from inside a function because of memory-management
limitations. In current sources there is an error check to prevent you
from trying.
regards, tom lane