From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | Lorusso Domenico <domenico(dot)l76(at)gmail(dot)com>, pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: How to add function schema in search_path in option definitio |
Date: | 2023-07-08 15:31:25 |
Message-ID: | a954e21b-dcbc-2d60-c508-3a8e73439d38@aklaver.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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 per:
https://www.postgresql.org/docs/15/sql-createfunction.html
Writing SECURITY DEFINER Functions Safely
-- Set a secure search_path: trusted schema(s), then 'pg_temp'.
SET search_path = admin, pg_temp;
or outside the function?
2) How long do you want this change to last?
3) Is this 'function_schema()' actually a function and if so what is it
doing/returning?
>
> --
> Domenico L.
>
> per stupire mezz'ora basta un libro di storia,
> io cercai di imparare la Treccani a memoria... [F.d.A.]
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Adrian Klaver | 2023-07-08 15:46:21 | Re: How to add function schema in search_path in option definitio |
Previous Message | Lorusso Domenico | 2023-07-08 15:06:29 | How to add function schema in search_path in option definitio |