Re: REVIEW: Extensions support for pg_dump
От | Anssi Kääriäinen |
---|---|
Тема | Re: REVIEW: Extensions support for pg_dump |
Дата | |
Msg-id | 4D35515F.5050708@thl.fi обсуждение исходный текст |
Ответ на | Re: REVIEW: Extensions support for pg_dump (Kääriäinen Anssi <anssi.kaariainen@thl.fi>) |
Ответы |
Re: REVIEW: Extensions support for pg_dump
|
Список | pgsql-hackers |
On 01/17/2011 07:58 PM, Kääriäinen Anssi wrote: > The issue I saw was this: assume you have an extension foo, containing one function, test(). > > 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 beenwrong... 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. 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". - Anssi
В списке pgsql-hackers по дате отправления: