Re: CHECK that involves a function call behaves differently during bulk load? - Mailing list pgsql-bugs

From Tom Lane
Subject Re: CHECK that involves a function call behaves differently during bulk load?
Date
Msg-id 2953758.1741911833@sss.pgh.pa.us
Whole thread Raw
In response to Re: CHECK that involves a function call behaves differently during bulk load?  ("David G. Johnston" <david.g.johnston@gmail.com>)
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #18839: ARMv7 builds fail due to missing __crc32cw and similar
Next
From: Mathew Heard
Date:
Subject: Re: BUG #18839: ARMv7 builds fail due to missing __crc32cw and similar