From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | Wilma Wantren <wilma(dot)wantren(at)eclipso(dot)de> |
Cc: | pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: Changing a schema's name with function1 calling function2 |
Date: | 2023-12-23 16:31:39 |
Message-ID: | 90ca8707-6f44-47c2-b781-0138947d7483@aklaver.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 I suspect that in at least 90% of the cases where a function needs a search_path, this variable would be the value of the search_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(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2023-12-23 16:35:16 | Re: Unable to start postgresql-14 |
Previous Message | Wilma Wantren | 2023-12-23 16:12:38 | Re: Re: Changing a schema's name with function1 calling function2 |