From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Caleb Welton <cwelton(at)greenplum(dot)com> |
Cc: | KaiGai Kohei <kaigai(at)ak(dot)jp(dot)nec(dot)com>, Euler Taveira de Oliveira <euler(at)timbira(dot)com>, "David E(dot) Wheeler" <david(at)kineticode(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: CREATE OR REPLACE FUNCTION vs ownership |
Date: | 2009-10-02 15:38:36 |
Message-ID: | 603c8f070910020838u20a58998o33792a8b374dd729@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, Oct 2, 2009 at 10:25 AM, Caleb Welton <cwelton(at)greenplum(dot)com> wrote:
> Right - so the subtle point here is that ALTER means something
> different from CREATE OR REPLACE. "ALTER" means to make a
> modification to something; to change it; to adjust one particular
> property of the object without disturbing the others. On the other
> hand, "REPLACE" means to get rid of something and replace it with an
> entirely new thing. I think that is exactly why we have ALTER TABLE
> but CREATE OR REPLACE FUNCTION.
>
> Now, if we want to have an ALTER FUNCTION that replaces the function
> definition and leaves the owner intact - fine! But that is not what
> REPLACE means.
>
> By this argument CREATE OR REPLACE FUNCTION should be able to change the
> return type of the function; which it can't.
No, because when we REPLACE we (rightly) prohibit a replacement that
is incompatible with the existing uses of the function.
...Robert
From | Date | Subject | |
---|---|---|---|
Next Message | David E. Wheeler | 2009-10-02 15:43:49 | Re: latest hstore patch |
Previous Message | David E. Wheeler | 2009-10-02 15:35:50 | Re: CREATE OR REPLACE FUNCTION vs ownership |