How to correct schema-names within function when the schema gets renamed?

Поиск
Список
Период
Сортировка
От Andreas
Тема How to correct schema-names within function when the schema gets renamed?
Дата
Msg-id 4E5B7B93.2070509@gmx.net
обсуждение исходный текст
Ответы Re: How to correct schema-names within function when the schema gets renamed?  (damien clochard <damien@dalibo.info>)
Re: How to correct schema-names within function when the schema gets renamed?  (Merlin Moncure <mmoncure@gmail.com>)
Список pgsql-novice
Hi,
how can I correct schema-names within function when the schema gets renamed?
PG corrects automagicaly every view and foreign key.

Though I found that it doesn't update the schema-name in sql-functions.
Say there where a table "bar" in the schema "foo"
and there is a function f(int) that results to "select * from foo.bar
where id = $1".

Then I rename "foo" to "sansi" and all seems nice till I call f().
Now I get an error that schema "foo" can't be found.

How could I find all functions that use the now uncorrect schema-name?

Btw, server is PG 8.4.

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

Предыдущее
От: ennio
Дата:
Сообщение: Re: Data corruption after an update set ...?
Следующее
От: pasman pasmański
Дата:
Сообщение: Re: nice updates