Обсуждение: updating a function

Поиск
Список
Период
Сортировка

updating a function

От
"Chris Ruprecht"
Дата:
Hi all,
 
not sure, if this belongs into this list or in the SQL list, but, here goes:
 
I changed a function (some business rules changed). I did the writing of the code in one terminal window and I had another terminal window open, running in psql.
after I saved the file to disk (vi :w command :), I did an \i function-name.sql in the psql window.
It did the DROP/CREATE thing just as expected, but when I then ran the function (select function-name();), it was still running the OLD version.
After I did a \q and back into psql cycle and re-ran the function, it used the new version.
 
It seems to have something to do with caching. Can anybody tell me which parameter to switch on or off to prevent this behavior?
 
Best regards,
Chris