From: | Dmitriy Igrishin <dmitigr(at)gmail(dot)com> |
---|---|
To: | Evan Martin <postgresql(at)realityexists(dot)net> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Drop all overloads of a function without knowing parameter types |
Date: | 2014-02-04 16:44:52 |
Message-ID: | CAAfz9KOBJteQ_GFCik5gJaAKrcEkndROddphzohLO+6Dyfu1Gw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
2014-02-03 Evan Martin <postgresql(at)realityexists(dot)net>:
> Thanks for that "oid::regprocedure" trick! A query like this is fairly
> simple once you know it, but completely non-obvious when you don't.
>
> I'm not sure what conditions others want to search on (couldn't find it in
> the list archives), but "by qualified function name" seems like the obvious
> one. If you don't wish to add that to the core, how about a system function
> that does this and is mentioned in the documentation for DROP FUNCTION?
> That way, if people have other criteria they can find the function, look at
> its source and adapt it to their needs. If you don't want to add a
> function, either, it would be good to at least document this (on the DROP
> FUNCTION page). Something like "Note: DROP FUNCTION does not allow you to
> drop a function without knowing its argument types, but you can use the
> following script to drop all overloads of a given function name..."
>
The function name (as well as the name of any other database object, such
as view or rule)
can have a prefix or suffix. (We are prefix our functions with the class
name to consider
them as methods in terms of object-oriented design.) Thus, such system
function
for dropping functions should accept something like a regular expression as
it argument.
Moreover, how about other database objects which can be dropped: views,
triggers, rules,
domains etc etc. For completeness it is necessary the existence of system
functions
for dropping these objects too.
So, I am with Tom here.
--
// Dmitry.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2014-02-04 16:48:38 | Re: Drop all overloads of a function without knowing parameter types |
Previous Message | Sergey Konoplev | 2014-02-04 16:40:33 | Re: Drop all overloads of a function without knowing parameter types |