Re: CREATE OR REPLACE FUNCTION vs ownership
От | Robert Haas |
---|---|
Тема | Re: CREATE OR REPLACE FUNCTION vs ownership |
Дата | |
Msg-id | 603c8f070910020838u20a58998o33792a8b374dd729@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: CREATE OR REPLACE FUNCTION vs ownership (Caleb Welton <cwelton@greenplum.com>) |
Список | pgsql-hackers |
On Fri, Oct 2, 2009 at 10:25 AM, Caleb Welton <cwelton@greenplum.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
В списке pgsql-hackers по дате отправления: