On Tue, 17 May 2005 11:21:14 -0700, Alan T. Miller wrote
> I had written a function that would recreate a static table. The
> function called the "DROP TABLE" command and then proceeded to
> create the new table. This used to work fine until I upgraded the
> database server to 8.x. Now when I try to run the function I get the
> error message...
>
> ERROR: DROP TABLE is not allowed in a non-volatile function
>
> What can I do now? Is there a way to redefine my function so that it
> is a "non-volatile" function? Tried to find more about this online
> with little luck. Please any suggestions would be welcome.
>
> Alan
Alan,
At the end of the function definition you may find a line that reads something
like: LANGUAGE 'plpgsql' STABLE; simply change it to: LANGUAGE 'plpgsql'
VOLATILE;
Kind regards,
Keith