Re: Changing a schema's name with function1 calling function2

Поиск
Список
Период
Сортировка
От Adrian Klaver
Тема Re: Changing a schema's name with function1 calling function2
Дата
Msg-id 90ca8707-6f44-47c2-b781-0138947d7483@aklaver.com
обсуждение исходный текст
Ответ на Re: Re: Changing a schema's name with function1 calling function2  ("Wilma Wantren" <wilma.wantren@eclipso.de>)
Ответы Re: Changing a schema's name with function1 calling function2
Список pgsql-general
On 12/23/23 08:12, Wilma Wantren wrote:
> Thank you!
> I had already feared that such a variable does not exist (because I had not found it). I think that's a pity, because
Isuspect that in at least 90% of the cases where a function needs a search_path, this variable would be the value of
thesearch_path, so that in 90% of the cases no change to the search_path would be necessary after renaming the schema.
 

I would say the issue is with this from your previous post:


"Therefore it would be great if there was a variable which I could set 
in a search_path (like the variable "$user") which denotes the 
function's schema and which is only evaluated when the function is 
executed, i.e. the variable would be the value of the function's 
search_path in the function's meta data."

search_path can be set(just off the top of head):

postgresql.conf and it's include files
ALTER DATABASE
ALTER FUNCTION
ALTER ROLE
ALTER SYSTEM
At any point by a user/script/function/etc.

Even if such a variable existed you be chasing down the 'correct' 
version of search_path that had it. Basically where you are now.

> Many thanks for the reference to sqitch, I'll have a look at that now.
>   
> 


-- 
Adrian Klaver
adrian.klaver@aklaver.com




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

Предыдущее
От: "Wilma Wantren"
Дата:
Сообщение: Re: Re: Changing a schema's name with function1 calling function2
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Unable to start postgresql-14