Re: search_path for PL/pgSQL functions partially cached? - Mailing list pgsql-general

From Isaac Morland
Subject Re: search_path for PL/pgSQL functions partially cached?
Date
Msg-id CAMsGm5fVJzOZ6kNDwkiRuFZFW=cY=FZixaSOd=WRdP0QLdoqew@mail.gmail.com
Whole thread Raw
In response to Re: search_path for PL/pgSQL functions partially cached?  (Jan Behrens <jbe-mlist@magnetkern.de>)
Responses Re: search_path for PL/pgSQL functions partially cached?
List pgsql-general
On Fri, 3 Jan 2025 at 18:22, Jan Behrens <jbe-mlist@magnetkern.de> wrote:
 
Instead, I plan to expect the function to receive a query string that
will get the data that is being processed by the function.

That query string should be allowed to refer to tables in the
search_path at the caller's side.

Therefore, I cannot use the "SET search_path FROM CURRENT" in my
"CREATE FUNCTION" statement, because it would overwrite the current
search_path on each call of the function.

 I wonder if it would help if EXECUTE took an optional search_path to use while executing the query.

pgsql-general by date:

Previous
From: Jan Behrens
Date:
Subject: Re: search_path for PL/pgSQL functions partially cached?
Next
From: Arbol One
Date:
Subject: To uninstall or not to uninstall that is...