"Michael Paesold" <mpaesold(at)gmx(dot)at> writes:
> I have written a test function, that will create a sequence and a table,
> than insert one million rows into the table, analyze the table and create an
> index on one of the columns.
You can't run ANALYZE inside a function. In CVS tip there's a check to
prevent the VACUUM variant of this problem, but I'm not sure if it
handles the ANALYZE variant (yet).
regards, tom lane