On 2015-04-24 13:30:49 -0400, Tom Lane wrote:
> [ catching up on email post-vacation ]
Welcome back Tom! Hope you had a nice and relaxing time.
> It's okay to store resulttype and retset
> because we disallow changing the output type (including set-ness) of a
> function; but we don't want to disallow changing strictness for
> instance.
I don't think we forbid changing the volatility. I'm pretty sure I've
changed that using CREATE OR REPLACE in the past.
Yep:
postgres[l]=# CREATE FUNCTION blarg() RETURNS int VOLATILE LANGUAGE SQL AS $$SELECT 1;$$;
CREATE FUNCTION
postgres[l]=# CREATE OR REPLACE FUNCTION blarg() RETURNS int STABLE LANGUAGE SQL AS $$SELECT 1;$$;
CREATE FUNCTION
Greetings,
Andres Freund