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

2014-02-04 Thread Alvaro Herrera
Sergey Konoplev escribió: > >> I understand the POV of both Evan and you here. However, I think that > >> there might be a good solution for this particular case - to allow > >> dropping functions by name only if it has the only signature, but if > >> there are 2 or more signatures then print an e

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

2014-02-04 Thread Evan Martin
In a nutshell: I think the difficulty of dropping functions is inconsistent with the difficulty of dropping other objects and I'd like to see this inconsistency fixed. So I don't agree with the suggestion of matching function names using a regex, since that's not supported for other types of o

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

2014-02-04 Thread Tom Lane
Sergey Konoplev writes: > On Tue, Feb 4, 2014 at 8:35 AM, Alvaro Herrera > wrote: >> Sergey Konoplev escribió: >>> On Mon, Feb 3, 2014 at 10:09 AM, Tom Lane wrote: People periodically ask for extensions flavored more or less like this, but I'm suspicious of building any such thing int

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

2014-02-04 Thread Sergey Konoplev
On Tue, Feb 4, 2014 at 8:35 AM, Alvaro Herrera wrote: > Sergey Konoplev escribió: >> On Mon, Feb 3, 2014 at 10:09 AM, Tom Lane wrote: >> > People periodically ask for extensions flavored more or less like this, >> > but I'm suspicious of building any such thing into the core. There's too >> > li

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

2014-02-04 Thread Alvaro Herrera
Sergey Konoplev escribió: > On Mon, Feb 3, 2014 at 10:09 AM, Tom Lane wrote: > > People periodically ask for extensions flavored more or less like this, > > but I'm suspicious of building any such thing into the core. There's too > > little commonality in the exact conditions they want to search

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

2014-02-04 Thread Dmitriy Igrishin
2014-02-03 Evan Martin : > 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 na

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

2014-02-04 Thread Sergey Konoplev
On Tue, Feb 4, 2014 at 8:35 AM, Alvaro Herrera wrote: > Sergey Konoplev escribió: >> On Mon, Feb 3, 2014 at 10:09 AM, Tom Lane wrote: >> > People periodically ask for extensions flavored more or less like this, >> > but I'm suspicious of building any such thing into the core. There's too >> > li

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

2014-02-04 Thread Sergey Konoplev
On Mon, Feb 3, 2014 at 10:09 AM, Tom Lane wrote: > People periodically ask for extensions flavored more or less like this, > but I'm suspicious of building any such thing into the core. There's too > little commonality in the exact conditions they want to search on. > Leaving it at the level of a

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

2014-02-03 Thread Evan Martin
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.

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

2014-02-03 Thread Tom Lane
Evan Martin writes: > Is there any easy way to drop a function (all overloads of it) without > knowing the parameter types? Something along the lines of do $$ declare fname text; begin for fname in select oid::regprocedure from pg_proc where proname = 'foo' loop execute 'drop function ' || fn

[GENERAL] Drop all overloads of a function without knowing parameter types

2014-02-03 Thread Evan Martin
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 REPLA