Re: pgsql: Fix search_path to a safe value during maintenance operations. - Mailing list pgsql-hackers

From David G. Johnston
Subject Re: pgsql: Fix search_path to a safe value during maintenance operations.
Date
Msg-id CAKFQuwbLmqsATUzFzqrrrVBC5ynVV3iETkpz8Hxvu57v3WgNuA@mail.gmail.com
Whole thread Raw
In response to Re: pgsql: Fix search_path to a safe value during maintenance operations.  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: pgsql: Fix search_path to a safe value during maintenance operations.
List pgsql-hackers
On Tue, Aug 1, 2023 at 2:38 PM Jeff Davis <pgsql@j-davis.com> wrote:
On Tue, 2023-08-01 at 11:16 -0700, David G. Johnston wrote:
> They can use ALTER FUNCTION and the existing "FROM CURRENT"
> specification to get back to current behavior if desired.

The current behavior is that the search_path comes from the environment
each execution. FROM CURRENT saves the search_path at definition time
and uses that each execution.


Right...I apparently misread "create" as "the" in "when CREATE FUNCTION is executed".

The overall point stands, it just requires defining a similar "FROM SESSION" to allow for explicitly specifying the current default (missing) behavior.

David J.

pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Re: pgsql: Fix search_path to a safe value during maintenance operations.
Next
From: Jeff Davis
Date:
Subject: Re: pgsql: Fix search_path to a safe value during maintenance operations.