Re: plan invalidation vs stored procedures

Поиск
Список
Период
Сортировка
От Martin Pihlak
Тема Re: plan invalidation vs stored procedures
Дата
Msg-id 48985FD2.4040505@gmail.com
обсуждение исходный текст
Ответ на Re: plan invalidation vs stored procedures  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: plan invalidation vs stored procedures  ("Pavel Stehule" <pavel.stehule@gmail.com>)
Re: plan invalidation vs stored procedures  ("Merlin Moncure" <mmoncure@gmail.com>)
Список pgsql-hackers
>> DROP FUNCTION
>> create function foo() returns integer as $$ begin return 2; end; $$ language plpgsql;
>> CREATE FUNCTION
>> execute c1;
>> psql:test.sql:11: ERROR:  cache lookup failed for function 36555
> 
> This is simply a bad, wrong, stupid way to do it.  Why do you not use
> CREATE OR REPLACE FUNCTION?
> 

Well, the test case was an illustration. The actual reason for DROP and CREATE is
the inability to change function return type. In our case there are plpgsql OUT
parameters involved, and there is no other way to add additional OUT parameters
without dropping the function first. I'd be glad if this was fixed, but I still
think that proper plan invalidation for function changes is needed (inlined
functions, ALTER FUNCTION stuff etc.)

regards,
Martin



В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Asko Oja"
Дата:
Сообщение: Re: plan invalidation vs stored procedures
Следующее
От: "Pavel Stehule"
Дата:
Сообщение: Re: plan invalidation vs stored procedures