| From: | Nathan Bossart <nathandbossart(at)gmail(dot)com> | 
|---|---|
| To: | Jeff Davis <pgsql(at)j-davis(dot)com> | 
| Cc: | pgsql-hackers(at)postgresql(dot)org | 
| Subject: | Re: [17] Special search_path names "!pg_temp" and "!pg_catalog" | 
| Date: | 2023-10-26 21:28:32 | 
| Message-ID: | 20231026212832.GA1139665@nathanxps13 | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
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 the list unless the markers
> +	 * "!pg_catalog" or "!pg_temp" are present.  Note these go on the front,
> +	 * not the back; also notice that we do not check USAGE permissions for
> +	 * these.
>  	 */
> -	if (!list_member_oid(oidlist, PG_CATALOG_NAMESPACE))
> +	if (implicit_pg_catalog &&
> +		!list_member_oid(oidlist, PG_CATALOG_NAMESPACE))
>  		oidlist = lcons_oid(PG_CATALOG_NAMESPACE, oidlist);
>  
> -	if (OidIsValid(myTempNamespace) &&
> +	if (implicit_pg_temp &&
> +		OidIsValid(myTempNamespace) &&
>  		!list_member_oid(oidlist, myTempNamespace))
>  		oidlist = lcons_oid(myTempNamespace, oidlist);
Should we disallow including both !pg_temp and pg_temp at the same time?  I
worry that could be a source of confusion.  IIUC your patches effectively
ignore !pg_temp if pg_temp is explicitly listed elsewhere in the list.
-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2023-10-26 21:32:14 | Re: Does UCS_BASIC have the right CTYPE? | 
| Previous Message | David G. Johnston | 2023-10-26 21:27:52 | Re: Add recovery to pg_control and remove backup_label |