Re: CREATE OR REPLACE FUNCTION vs ownership - Mailing list pgsql-hackers

From David E. Wheeler
Subject Re: CREATE OR REPLACE FUNCTION vs ownership
Date
Msg-id 69F788CC-F345-489F-AF1F-E32348824B39@kineticode.com
Whole thread Raw
In response to Re: CREATE OR REPLACE FUNCTION vs ownership  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: CREATE OR REPLACE FUNCTION vs ownership
List pgsql-hackers
On Oct 2, 2009, at 7:49 AM, Tom Lane wrote:

> But in fact CREATE OR REPLACE is *not* meant to be the same as DROP
> followed by CREATE.  What it is meant to do is allow you to replace  
> the
> implementation of the function while existing callers see it as still
> being the same function.  Thus we prevent you from changing the name,
> arguments, or result type of the function.  If we were to replace the
> permissions that would result in a more insidious but still real  
> reason
> why former callers would suddenly stop working.  In effect,  
> permissions
> are part of the function's API.

Okay, this convinces me otherwise. But is it not in fact the case that  
CREATE OR REPLACE FUNCTION doesn't expire the old version of the  
function in the cache of other processes? Don't those processes have  
to reconnect in order to see the new function?

Best,

David


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: latest hstore patch
Next
From: Robert Haas
Date:
Subject: Re: CREATE OR REPLACE FUNCTION vs ownership