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

Поиск
Список
Период
Сортировка
От Nathan Bossart
Тема Re: [17] Special search_path names "!pg_temp" and "!pg_catalog"
Дата
Msg-id 20231026212832.GA1139665@nathanxps13
обсуждение исходный текст
Ответ на [17] Special search_path names "!pg_temp" and "!pg_catalog"  (Jeff Davis <pgsql@j-davis.com>)
Ответы Re: [17] Special search_path names "!pg_temp" and "!pg_catalog"  (Jeff Davis <pgsql@j-davis.com>)
Список 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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: Add recovery to pg_control and remove backup_label
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Does UCS_BASIC have the right CTYPE?