Re: [17] Special search_path names "!pg_temp" and "!pg_catalog"

2023-10-31 Thread Nathan Bossart
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

Re: [17] Special search_path names "!pg_temp" and "!pg_catalog"

2023-10-27 Thread Jeff Davis
On Thu, 2023-10-26 at 16:28 -0500, Nathan Bossart wrote: > On Fri, Aug 18, 2023 at 02:44:31PM -0700, Jeff Davis wrote: > > +    SET search_path = admin, "!pg_temp"; > > I think it's unfortunate that these new identifiers must be quoted.  > I > wonder if we could call these something like

Re: [17] Special search_path names "!pg_temp" and "!pg_catalog"

2023-10-26 Thread Nathan Bossart
On Fri, Aug 18, 2023 at 02:44:31PM -0700, Jeff Davis wrote: > +SET search_path = admin, "!pg_temp"; I think it's unfortunate that these new identifiers must be quoted. I wonder if we could call these something like "no_pg_temp". *shrug* > + * Add any implicitly-searched namespaces to

Re: [17] Special search_path names "!pg_temp" and "!pg_catalog"

2023-08-21 Thread Jeff Davis
On Sat, 2023-08-19 at 07:18 +0200, Pavel Stehule wrote: > cannot be better special syntax > > CREATE OR REPLACE FUNCTION xxx() > RETURNS yyy AS $$ ... $$$ > SET SEARCH_PATH DISABLE > > with possible next modification > > SET SEARCH_PATH CATALOG .. only for pg_catalog > SET SEARCH_PATH MINIMAL

Re: [17] Special search_path names "!pg_temp" and "!pg_catalog"

2023-08-18 Thread Pavel Stehule
Hi pá 18. 8. 2023 v 23:44 odesílatel Jeff Davis napsal: > The attached patch adds some special names to prevent pg_temp and/or > pg_catalog from being included implicitly. > > This is a useful safety feature for functions that don't have any need > to search pg_temp. > > The current (v16)

[17] Special search_path names "!pg_temp" and "!pg_catalog"

2023-08-18 Thread Jeff Davis
The attached patch adds some special names to prevent pg_temp and/or pg_catalog from being included implicitly. This is a useful safety feature for functions that don't have any need to search pg_temp. The current (v16) recommendation is to include pg_temp last, which does add to the safety, but