Re: [17] Special search_path names "!pg_temp" and "!pg_catalog" - Mailing list pgsql-hackers

From Nathan Bossart
Subject Re: [17] Special search_path names "!pg_temp" and "!pg_catalog"
Date
Msg-id 20231031163145.GA72255@nathanxps13
Whole thread Raw
In response to Re: [17] Special search_path names "!pg_temp" and "!pg_catalog"  (Jeff Davis <pgsql@j-davis.com>)
List pgsql-hackers
On Fri, Oct 27, 2023 at 12:58:47PM -0700, Jeff Davis wrote:
> Do you, overall, find this feature useful?
> 
> Most functions don't need pg_temp, so it feels cleaner to exclude it.
> But pg_temp is ignored for function/op lookup anyway, so functions
> won't be exposed to search_path risks related to pg_temp unless they
> are accessing tables.
> 
> If my proposal for the SEARCH clause got more support, I'd be more
> excited about this feature because it could be set implicitly as part
> of a safe search_path. Without the SEARCH clause, the only way to set
> "!pg_temp" is by typing it out, and I'm not sure a lot of people will
> actually do that.

I thought it sounded generally useful, but if we're not going to proceed
with the primary use-case for this feature, then perhaps it's not worth
going through this particular one-way door at this time.

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com



pgsql-hackers by date:

Previous
From: Christoph Berg
Date:
Subject: Re: [PATCH] Extend ALTER OPERATOR to support adding commutator, negator, hashes, and merges
Next
From: "Euler Taveira"
Date:
Subject: Re: Allowing TRUNCATE of FK target when session_replication_role=replica