On 01/17/2011 07:58 PM, Kääriäinen Anssi wrote:
The rename is an error on my part, sorry for that. Renaming can be done,
but dropping is not possible even after rename. But a function in a
package can be CREATE OR REPLACEd, and after that the function can be
dropped. COR should be restricted in the same way as DROP is. I will
check if this is still a problem with the latest patch.
The issue I saw was this: assume you have an extension foo, containing one
CREATE EXTENSION foo;
DROP FUNCTION test();
-- restricted due to dependency
ALTER FUNCTION test() RENAME TO test2;
DROP FUNCTION test2();
-- not restricted!
The same can be done using CREATE OR REPLACE.
I hope this is not an error on my part. It is possible because I had a lot of
schemas and my search_path might have been wrong...
Another problem is that you can ALTER FUNCTION test() SET SCHEMA =
something_else, and you can alter the functions search_path, which could
be a problem for non-relocatable extensions. Even if the schema is
changed, dropping extension / altering extension will work as expected.
The function is just in different schema than the extension. But, both
of these IMO fall in the category "don't do that".
Sent via pgsql-hackers mailing list (firstname.lastname@example.org)
To make changes to your subscription: