Re: Feature Request: ALTER FUNCTION (or something like that) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Feature Request: ALTER FUNCTION (or something like that)
Date
Msg-id 16223.985740467@sss.pgh.pa.us
Whole thread Raw
In response to Feature Request: ALTER FUNCTION (or something like that)  (Joel Burton <jburton@scw.org>)
Responses Re: Feature Request: ALTER FUNCTION (or something like that)  (Joel Burton <jburton@scw.org>)
List pgsql-hackers
Joel Burton <jburton@scw.org> writes:
> . add a command like ALTER FUNCTION foo(text) TO foo(text) returns text as
> ....

This is on the TODO list already, I believe.

> This would seem to require that the new function would take the same
> parameters (and return the same?) as the old function.

If it doesn't take the same parameters then it's not the same function
at all, so that part is a nonissue.  We'd have to disallow change of
return type as well.

> Perhaps this is tricky,

Updating pg_proc wouldn't be hard.  What's missing is a notification
mechanism that would cause cached copies of the function to get
replaced.  A crude first cut could just ignore that issue and still be
extremely useful for development ...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Vince Vielhaber
Date:
Subject: Re: IANA registration
Next
From: Thomas Lockhart
Date:
Subject: Re: Solaris problems (was Re: SPARC Solaris 8 OK)