Re: Feature Request: ALTER FUNCTION (or something like that)

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Joel Burton <jburton@scw.org>
Cc: pgsql-hackers@postgresql.org
Date: 2001-03-28T00:47:47Z
Lists: 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