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

From Sergey Konoplev
Subject Re: Drop all overloads of a function without knowing parameter types
Date
Msg-id CAL_0b1s46xc+B7bNj2uNW38nsqqyNGG3PsQ-mOm=jMe+-X-dBw@mail.gmail.com
Whole thread Raw
In response to Re: Drop all overloads of a function without knowing parameter types  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-general
On Tue, Feb 4, 2014 at 8:35 AM, Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
> Sergey Konoplev escribió:
>> On Mon, Feb 3, 2014 at 10:09 AM, Tom Lane <tgl@sss.pgh.pa.us> 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 scripting problem, as above, allows arbitrary
>> > customization of the search condition.
>>
>> 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 error specifying all the
>> forms of the function, eg.:
>>
>> ERROR: Can not drop function 'foo' because it has more then one
>> signature: foo(integer), foo(text).
>
> But that doesn't solve Evan's request.  He would want both functions
> gone, not an error.

Yes, I was mostly writing about the general case rather than about the OP's one.

--
Kind regards,
Sergey Konoplev
PostgreSQL Consultant and DBA

http://www.linkedin.com/in/grayhemp
+1 (415) 867-9984, +7 (901) 903-0499, +7 (988) 888-1979
gray.ru@gmail.com


pgsql-general by date:

Previous
From: Dmitriy Igrishin
Date:
Subject: Re: Drop all overloads of a function without knowing parameter types
Next
From: Tom Lane
Date:
Subject: Re: Drop all overloads of a function without knowing parameter types