Re: CREATE FUNCTION ... SEARCH { DEFAULT | SYSTEM | SESSION }
Jeff Davis <pgsql@j-davis.com>
From: Jeff Davis <pgsql@j-davis.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Peter Eisentraut <peter@eisentraut.org>, pgsql-hackers@postgresql.org
Date: 2023-11-15T04:21:16Z
Lists: pgsql-hackers
On Mon, 2023-09-25 at 11:30 -0400, Robert Haas wrote: > > That's what this whole thread is about: I wish it was reasonable, > > but I > > don't think the tools we provide today make it reasonable. You > > expect > > Bob to do something like: > > > > CREATE FUNCTION ... SET search_path = pg_catalog, pg_temp ... > > > > for all functions, not just SECURITY DEFINER functions, is that > > right? > > Yes, I do. I think it's self-evident that a SQL function's behavior > is > not guaranteed to be invariant under all possible values of > search_path. If you care about your function behaving the same way > all > the time, you have to set the search_path. After adding the search path cache (recent commit f26c2368dc) hopefully that helps to make the above suggestion more reasonable performance- wise. I think we can call that progress. Regards, Jeff Davis
Commits
-
Cache opaque handle for GUC option to avoid repeasted lookups.
- 867dd2dc8704 17.0 landed
-
Add cache for recomputeNamespacePath().
- f26c2368dcae 17.0 cited