"Rod Taylor" <[EMAIL PROTECTED]> writes:
> 7.2 crashes with the below function:

> CREATE OR REPLACE FUNCTION runMaintenance()
> RETURNS BOOL AS '
>   VACUUM;
>   SELECT TRUE;
> ' LANGUAGE sql;

Ugh.  The problem is that VACUUM's implicit CommitTransaction calls
wipe out all the transient memory allocated by the function evaluation.
I don't see any reasonable way to support VACUUM inside a function
call; I think we have to prohibit it.

Unfortunately I don't see any clean way to test for this situation
either.  VACUUM's IsTransactionBlock() test obviously doesn't get the
job done.  Any ideas how to catch this?

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Reply via email to