pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: Kirk Parker <khp@equatoria.us>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Subject: Re: CHECK that involves a function call behaves differently during bulk load?
Date: Thu, 13 Mar 2025 20:23:53 -0400
Message-ID: <2953758.1741911833@sss.pgh.pa.us> (raw)
In-Reply-To: <CAKFQuwYwmd0EEo0vXtJy+TRA-RC3RbbGLvsT6fpALWewqqgDag@mail.gmail.com>
References: <CANwZ8rkWYYmNStgEBX9SbtM0j6izFJPCU4b4hLZRSFOD506TgA@mail.gmail.com>
	<CAKFQuwZG5GwXFwE5WLLGeu4hEKt51mN-6iKM-q5rqb4wMD+a1w@mail.gmail.com>
	<CANwZ8rmKvHNRd3O7Y7SyVnL=Bni-sVKJ0X4fDX+aKQqmdXupgQ@mail.gmail.com>
	<CAKFQuwYwmd0EEo0vXtJy+TRA-RC3RbbGLvsT6fpALWewqqgDag@mail.gmail.com>

"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





view thread (5+ messages)

Message-ID: <2953758.1741911833@sss.pgh.pa.us>
Permalink:  ../2953758.1741911833@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2953758.1741911833@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, david.g.johnston@gmail.com, khp@equatoria.us, pgsql-bugs@lists.postgresql.org
  Subject: Re: CHECK that involves a function call behaves differently during bulk load?
  In-Reply-To: <2953758.1741911833@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox