Re: ERROR: DROP TABLE is not allowed in a non-volatile function

Поиск
Список
Период
Сортировка
От Keith Worthington
Тема Re: ERROR: DROP TABLE is not allowed in a non-volatile function
Дата
Msg-id 20050517184437.M25296@narrowpathinc.com
обсуждение исходный текст
Ответ на ERROR: DROP TABLE is not allowed in a non-volatile function  ("Alan T. Miller" <amiller@hollywood101.com>)
Список pgsql-novice
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

В списке pgsql-novice по дате отправления:

Предыдущее
От: "Alan T. Miller"
Дата:
Сообщение: ERROR: DROP TABLE is not allowed in a non-volatile function
Следующее
От: Timo Roessner
Дата:
Сообщение: cluster-operation successfull?