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

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема [17] Special search_path names "!pg_temp" and "!pg_catalog"
Дата
Msg-id a6865db287596c9c6ea12bdd9de87216cb5e7902.camel@j-davis.com
обсуждение исходный текст
Ответы Re: [17] Special search_path names "!pg_temp" and "!pg_catalog"  (Pavel Stehule <pavel.stehule@gmail.com>)
Re: [17] Special search_path names "!pg_temp" and "!pg_catalog"  (Nathan Bossart <nathandbossart@gmail.com>)
Список pgsql-hackers
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 it's confusing to *include* a namespace when
your intention is actually to *exclude* it, and it's also not
completely excluding pg_temp.

Although the syntax in the attached patch is not much friendlier, at
least it's clear that the intent is to exclude pg_temp. Furthermore, it
will be friendlier if we adopt the SEARCH SYSTEM syntax proposed in
another thread[1].

Additionally, this patch adds a WARNING when creating a schema that
uses one of these special names. Previously, there was no warning when
creating a schema with the name "$user", which could cause confusion.

[1]
https://www.postgresql.org/message-id/flat/2710f56add351a1ed553efb677408e51b060e67c.camel@j-davis.com


--
Jeff Davis
PostgreSQL Contributor Team - AWS



Вложения

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

Предыдущее
От: Chapman Flack
Дата:
Сообщение: Re: Extract numeric filed in JSONB more effectively
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: Use of additional index columns in rows filtering