Re: How to add function schema in search_path in option definitio

2023-07-12 Thread Lorusso Domenico
eh.. yes to be honest what I create is more similar to an extension rather than a package, I don't believe to be able to create extensions in cloud sql (the actual target db). However , is there a way to share this preliminar "extension" with the community? I'm interested to discuss about

RE: How to add function schema in search_path in option definitio

2023-07-12 Thread Joel Rabinovitch
Hi, We have hit similar issues with the software that we develop. We don’t specify the schema names in stored procedures/functions we create. The way we resolved it was to define the schemas where the stored procedures/functions are located in the search path as part of the connection string

Re: How to add function schema in search_path in option definitio

2023-07-11 Thread David G. Johnston
On Sat, Jul 8, 2023 at 10:00 AM Lorusso Domenico wrote: > Hello Adrian, > I've created a schema to handle some specific features. > In the schema there are a couple of tables used by many functions (more > than 20). > In other words, I've created a schema as a package (as suggested in many >

Re: How to add function schema in search_path in option definitio

2023-07-11 Thread Adrian Klaver
On 7/11/23 12:47, Lorusso Domenico wrote: Adrian I have read your suggestions, but: 1) I need to change path inside a group of function (like a package) not for any connection 2) Yes inside function is clear I can do that 3) some like 1 and, moreover, I can't be sure to create my own role,

Re: How to add function schema in search_path in option definitio

2023-07-11 Thread Lorusso Domenico
Adrian I have read your suggestions, but: 1) I need to change path inside a group of function (like a package) not for any connection 2) Yes inside function is clear I can do that 3) some like 1 and, moreover, I can't be sure to create my own role, because the target db will be cloud sql My

Re: How to add function schema in search_path in option definitio

2023-07-11 Thread Adrian Klaver
On 7/11/23 12:35, Lorusso Domenico wrote: yes, but this is a code inside each function.  having 20 functions I've to start executing this instruction 20 times, one per function. I know it could work, I looking for something of more smart :-) Here:

Re: How to add function schema in search_path in option definitio

2023-07-11 Thread Lorusso Domenico
yes, but this is a code inside each function. having 20 functions I've to start executing this instruction 20 times, one per function. I know it could work, I looking for something of more smart :-) Il giorno dom 9 lug 2023 alle ore 23:21 Adrian Klaver < adrian.kla...@aklaver.com> ha scritto: >

Re: How to add function schema in search_path in option definitio

2023-07-09 Thread Adrian Klaver
On 7/9/23 13:47, Lorusso Domenico wrote: Hello Adrian and Peter, yes the set parameter in function definition is also my preferred choice, but I need to add the schema to path, not to substitute the path, this is my problem This post:

Re: How to add function schema in search_path in option definitio

2023-07-09 Thread Lorusso Domenico
Hello Adrian and Peter, yes the set parameter in function definition is also my preferred choice, but I need to add the schema to path, not to substitute the path, this is my problem Il giorno dom 9 lug 2023 alle ore 13:02 Peter J. Holzer ha scritto: > On 2023-07-08 19:00:02 +0200, Lorusso

Re: How to add function schema in search_path in option definitio

2023-07-09 Thread Peter J. Holzer
On 2023-07-08 19:00:02 +0200, Lorusso Domenico wrote: > I've created a schema to handle some specific features. > In the schema there are a couple of tables used by many functions (more than > 20). > In other words, I've created a schema as a package (as suggested in many > points). So this is

Re: How to add function schema in search_path in option definitio

2023-07-08 Thread Adrian Klaver
On 7/8/23 10:00, Lorusso Domenico wrote: Hello Adrian, I've created a schema to handle some specific features. In the schema there are a couple of tables used by many functions (more than 20). In other words, I've created a schema as a package (as suggested in many points). I wish, in a

Re: How to add function schema in search_path in option definitio

2023-07-08 Thread Lorusso Domenico
Hello Adrian, I've created a schema to handle some specific features. In the schema there are a couple of tables used by many functions (more than 20). In other words, I've created a schema as a package (as suggested in many points). I wish, in a function of this schema, to be able to call each

Re: How to add function schema in search_path in option definitio

2023-07-08 Thread Adrian Klaver
On 7/8/23 08:06, Lorusso Domenico wrote: Hello guys, there is a comfortable way to add the schema of the function as in search path? something like create my_schema.function() as $body$...$body$ set search_path to function_schema() || search_path You can do something like: show

Re: How to add function schema in search_path in option definitio

2023-07-08 Thread Adrian Klaver
On 7/8/23 08:06, Lorusso Domenico wrote: Hello guys, there is a comfortable way to add the schema of the function as in search path? something like create my_schema.function() as $body$...$body$ set search_path to function_schema() || search_path 1) Do you want this to happen inside

How to add function schema in search_path in option definitio

2023-07-08 Thread Lorusso Domenico
Hello guys, there is a comfortable way to add the schema of the function as in search path? something like create my_schema.function() as $body$...$body$ set search_path to function_schema() || search_path -- Domenico L. per stupire mezz'ora basta un libro di storia, io cercai di imparare la