Search Postgresql Archives

Re: Drop all overloads of a function without knowing parameter types

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 






2014-02-03 Evan Martin <postgresql@xxxxxxxxxxxxxxxxx>:
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.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux