Drop all overloads of a function without knowing parameter types

Поиск
Список
Период
Сортировка
От Evan Martin
Тема Drop all overloads of a function without knowing parameter types
Дата
Msg-id 52EFD825.4090508@realityexists.net
обсуждение исходный текст
Ответы Re: Drop all overloads of a function without knowing parameter types  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Hi All,

Is there any easy way to drop a function (all overloads of it) without knowing the parameter types? If not, it would be good to see it added.

When I change a function definition I just want to run the SQL script that defines it and have any existing function replaced. CREATE OR REPLACE FUNCTION does this - except if the parameter types, or even names, have changed. If this SO thread is correct, it's quite tricky to drop existing functions without knowing the parameter types:

http://stackoverflow.com/questions/7622908/drop-function-without-knowing-the-number-type-of-parameters

I'd like to see a much easier way. Either something like "DROP FUNCTION name ALL" or a system function that does the same thing or at least a built-in, "supported" way to get the signature of all the overloads, so they can be dropped one by one.

Regards,

Evan

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

Предыдущее
От: David Johnston
Дата:
Сообщение: Re: need of a lateral join with record set returning function?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Drop all overloads of a function without knowing parameter types