Re: Schema/ROLE Rename Issue

Поиск
Список
Период
Сортировка
От Brajendra Pratap Singh
Тема Re: Schema/ROLE Rename Issue
Дата
Msg-id CAFD-joOELFMYc1HxUV5naqS-6Ua7gRh=TZy0u3H+tsYB9-Mdvg@mail.gmail.com
обсуждение исходный текст
Ответ на Schema/ROLE Rename Issue  (Brajendra Pratap Singh <singh.bpratap766@gmail.com>)
Список pgsql-general
Thank you Albe..

Could u plz suggest me the best way to get the definition of functions via connecting through psql as while I am trying to change the definition through \ef function_name it won't reflect the changes.

Thanks
Brajendra

On Wed, 9 Sep, 2020, 7:39 PM Laurenz Albe, <laurenz.albe@cybertec.at> wrote:
On Wed, 2020-09-09 at 17:04 +0530, Brajendra Pratap Singh wrote:
> Recently we had renamed schema and role but it will not get reflect in the object definitions ,plz suggest.
>
> OLD SCHEMA/ROLE  -  TEST11
> NEW SCHEMA/ROLE -  TEST
>
> But still we are that TEST11 is present in the definition of sone objects like procudure,functions,triggers etc, so how can we modify the name from TEST11  to TEST in definition.
>

You cannot habe that automatically.

While in view and index definitions as well as column default clauses,
the internal object identifier is used, so that renaming doesn't break
anything, functions are stored as string literals and parsed at
execution time.

You'll have to edit all your functions (or undo the renaming).

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com

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

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: Autovacuum of independent tables
Следующее
От: Jehan-Guillaume de Rorthais
Дата:
Сообщение: Re: BUG? Slave don't reconnect to the master