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

2023-12-31 Thread Wilma Wantren
and thanks again Wilma --- Ursprüngliche Nachricht --- Von: Adrian Klaver Datum: 30.12.2023 19:05:28 An: Wilma Wantren Betreff: Re: Changing a schema's name with function1 calling function2 On 12/30/23 08:01, Wilma Wantren wrote: > Thank you all, and especially you, Adrian, for your answers. > H

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

2023-12-30 Thread Adrian Klaver
On 12/30/23 08:01, Wilma Wantren wrote: Thank you all, and especially you, Adrian, for your answers. However, I find the last suggestion too complicated. In Peter's words I had suggested a "magic variable" __function_schema__ which can be set as the search_path of a function to select - when

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

2023-12-30 Thread Wilma Wantren
ed, including the names of all functions whose search_path is to be changed. Many thanks again Wilma --- Ursprüngliche Nachricht --- Von: Adrian Klaver Datum: 27.12.2023 16:40:55 An: Kirk Wolak , Christophe Pettus Betreff: Re: Changing a schema's name with function1 calling function2 On 12/26/23 22:

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

2023-12-27 Thread Adrian Klaver
On 12/26/23 22:41, Kirk Wolak wrote: On Mon, Dec 25, 2023 at 1:47 PM Christophe Pettus > wrote: > On Dec 25, 2023, at 10:44, Adrian Klaver mailto:adrian.kla...@aklaver.com>> wrote: > Functions with same name in different schemas would need to be

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

2023-12-26 Thread Kirk Wolak
On Mon, Dec 25, 2023 at 1:47 PM Christophe Pettus wrote: > > > > On Dec 25, 2023, at 10:44, Adrian Klaver > wrote: > > Functions with same name in different schemas would need to be dealt > with. > > I think that's the primary use-case (at least, it would be for me), and I > don't see a

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

2023-12-25 Thread Christophe Pettus
> On Dec 25, 2023, at 10:44, Adrian Klaver wrote: > Functions with same name in different schemas would need to be dealt with. I think that's the primary use-case (at least, it would be for me), and I don't see a convenient way of doing that. Even a "get OID of current function" function

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

2023-12-25 Thread Adrian Klaver
On 12/25/23 09:29, Wilma Wantren wrote: Great that you have discussed this further! And sorry that what I wrote is apparently still misleading. Peter understood me correctly, "__function_schema__ always refers to the schema the function actually is in". I define: 1. create function

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

2023-12-25 Thread Wilma Wantren
icht --- Von: "Peter J. Holzer" Datum: 25.12.2023 15:37:26 An: Adrian Klaver Betreff: Re: Changing a schema's name with function1 calling function2 On 2023-12-24 14:27:19 -0800, Adrian Klaver wrote: > On 12/24/23 13:43, Peter J. Holzer wrote: > > I think you misunder

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

2023-12-25 Thread Peter J. Holzer
On 2023-12-24 14:27:19 -0800, Adrian Klaver wrote: > On 12/24/23 13:43, Peter J. Holzer wrote: > > I think you misunderstood Wilma. What she is asking for is a "keyword" > > or "magic variable" (or whatever you want to call it) which you can > > specify in CREATE|ALTER FUNCTION ... SET SEARCH_PATH

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

2023-12-24 Thread Adrian Klaver
On 12/24/23 13:43, Peter J. Holzer wrote: On 2023-12-23 08:31:39 -0800, Adrian Klaver wrote: I think you misunderstood Wilma. What she is asking for is a "keyword" or "magic variable" (or whatever you want to call it) which you can specify in CREATE|ALTER FUNCTION ... SET SEARCH_PATH = ...,

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

2023-12-24 Thread Peter J. Holzer
On 2023-12-23 08:31:39 -0800, Adrian Klaver wrote: > On 12/23/23 08:12, Wilma Wantren wrote: > > 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

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

2023-12-23 Thread Adrian Klaver
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

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

2023-12-23 Thread Wilma Wantren
: Changing a schema's name with function1 calling function2 On 12/22/23 15:09, Wilma Wantren wrote: > Thank you for your response! > No, this does not help me. I will try to explain better what I mean. Our customers use our program with a Postgres database, user and schema, which have the sam

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

2023-12-22 Thread Adrian Klaver
On 12/22/23 15:09, Wilma Wantren wrote: Thank you for your response! No, this does not help me. I will try to explain better what I mean. Our customers use our program with a Postgres database, user and schema, which have the same name. The customer chooses the name. Let's say one customer

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

2023-12-22 Thread Wilma Wantren
; would still denote the correct schema after renaming the schema. --- Ursprüngliche Nachricht --- Von: Adrian Klaver Datum: 21.12.2023 17:30:02 An: Wilma Wantren , pgsql-general@lists.postgresql.org Betreff: Re: Changing a schema's name with function1 calling function2 On 12/21/23 05:47, Wilma

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

2023-12-21 Thread Adrian Klaver
On 12/21/23 05:47, Wilma Wantren wrote: Now as text mail, sorry. I accidentally posted the following to the bugs mailing list first. Sorry for this, now as a question here. The company I work for used to only use Oracle databases for their program and now also supports PostgreSQL. With

Changing a schema's name with function1 calling function2

2023-12-21 Thread Wilma Wantren
Now as text mail, sorry. I accidentally posted the following to the bugs mailing list first. Sorry for this, now as a question here. The company I work for used to only use Oracle databases for their program and now also supports PostgreSQL. With Postgres, we create a database, a user and a

Changing a schema's name with function1 calling function2

2023-12-21 Thread Wilma Wantren
­I accidentally posted the following to the bugs mailing list first. Sorry for this, now as a question here.The company I work for used to only use Oracle databases for their program and now also supports PostgreSQL.With Postgres, we create a database, a user and a schema, which all have the same