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 solution

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

2023-07-12 Thread Joel Rabinovitch
:51 PM To: Lorusso Domenico Cc: Adrian Klaver ; pgsql-general@lists.postgresql.org Subject: Re: How to add function schema in search_path in option definitio ATTENTION: This email originated from outside of Tecsys. Use caution when clicking links or opening attachments. | Ce courriel provient de

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 > poin

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, bec

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 questi

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: https://www.postgresql.org/message-id/66677

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: https://www.postgresql.org/message-id/9f3db764-80

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 one

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 funct

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 ot

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 search_pat

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 function