From: | "Keith Worthington" <keithw(at)narrowpathinc(dot)com> |
---|---|
To: | "Alan T(dot) Miller" <amiller(at)hollywood101(dot)com>, <pgsql-novice(at)postgresql(dot)org> |
Subject: | Re: ERROR: DROP TABLE is not allowed in a non-volatile function |
Date: | 2005-05-17 18:46:36 |
Message-ID: | 20050517184437.M25296@narrowpathinc.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Timo Roessner | 2005-05-17 18:52:41 | cluster-operation successfull? |
Previous Message | Alan T. Miller | 2005-05-17 18:21:14 | ERROR: DROP TABLE is not allowed in a non-volatile function |