Re: CHECK that involves a function call behaves differently during bulk load?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: CHECK that involves a function call behaves differently during bulk load?
Дата
Msg-id 2953758.1741911833@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: CHECK that involves a function call behaves differently during bulk load?  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-bugs
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> On Thu, Mar 13, 2025 at 3:33 PM Kirk Parker <khp@equatoria.us> wrote:
>> (1) why does it work with individual inserts sent via psql, but not with
>> the redirected input from the dump?

> https://www.postgresql.org/docs/current/ddl-schemas.html#DDL-SCHEMAS-PATTERNS
> System maintenance and actions use a secure search_path.

Even more to the point, see the first compatibility entry at [1]:

    * Change functions to use a safe search_path during maintenance
      operations (Jeff Davis)

      This prevents maintenance operations (ANALYZE, CLUSTER, CREATE
      INDEX, CREATE MATERIALIZED VIEW, REFRESH MATERIALIZED VIEW,
      REINDEX, or VACUUM) from performing unsafe access. Functions
      used by expression indexes and materialized views that need to
      reference non-default schemas must specify a search path during
      function creation.

            regards, tom lane

[1] https://www.postgresql.org/docs/17/release-17.html#RELEASE-17-MIGRATION



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