Drop all overloads of a function without knowing parameter types - Mailing list pgsql-general

From Evan Martin
Subject Drop all overloads of a function without knowing parameter types
Date
Msg-id 52EFD825.4090508@realityexists.net
Whole thread Raw
Responses Re: Drop all overloads of a function without knowing parameter types
List 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 by date:

Previous
From: David Johnston
Date:
Subject: Re: need of a lateral join with record set returning function?
Next
From: Tom Lane
Date:
Subject: Re: Drop all overloads of a function without knowing parameter types