Re: CREATE OR REPLACE FUNCTION vs ownership

From: "David E(dot) Wheeler" <david(at)kineticode(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: KaiGai Kohei <kaigai(at)ak(dot)jp(dot)nec(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Euler Taveira de Oliveira <euler(at)timbira(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: CREATE OR REPLACE FUNCTION vs ownership
Date: 2009-10-02 15:35:50
Message-ID: 69F788CC-F345-489F-AF1F-E32348824B39@kineticode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2009-10-02 15:38:36 Re: CREATE OR REPLACE FUNCTION vs ownership
Previous Message Bruce Momjian 2009-10-02 15:20:35 Re: latest hstore patch