pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Ken Tanzer <ken.tanzer@gmail.com>
Cc: Rob Sargent <robjsargent@gmail.com>
Cc: pgsql-generallists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Error with pg_dump (of data), with --role
Date: Thu, 18 Feb 2021 23:44:36 -0500
Message-ID: <2996155.1613709876@sss.pgh.pa.us> (raw)
In-Reply-To: <CAD3a31Xgm7_BQdmmA_KZ7KfcRBOeriHNvf215Ru5UQa1BtBQZA@mail.gmail.com>
References: <CAD3a31XywdXfeLeSH0NTptRR4iQyiC7CsO_kkMBF6qTNhGC5zw@mail.gmail.com>
	<296ae0e1-8f2c-fc11-d184-f98dba3d0cd5@gmail.com>
	<CAD3a31Xgm7_BQdmmA_KZ7KfcRBOeriHNvf215Ru5UQa1BtBQZA@mail.gmail.com>

Ken Tanzer <ken.tanzer@gmail.com> writes:
> I'm not sure what you mean or are suggesting by that.  Is there something
> I'm supposed to do to set the search path?  Is that a known bug in
> pg_dump?  Something else?  As mentioned, there is only one schema....

There was a security change to pg_dump a few years ago to make it
put "set search_path = pg_catalog" into the dump script.  This
basically means that any user-defined function in indexes, check
constraints, etc is on its own to be sure that it schema-qualifies
non-system names, or has a "SET search_path" clause to do that
for it.  While that's annoying, it's also good practice.  Functions
that could be invoked in these contexts really ought not assume
what search path they are called with.

I do not think any of the other details you mentioned, such as
use of --role, have any impact on this.

			regards, tom lane





view thread (10+ messages)  latest in thread

Message-ID: <2996155.1613709876@sss.pgh.pa.us>
Permalink:  ../2996155.1613709876@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2996155.1613709876@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, ken.tanzer@gmail.com, robjsargent@gmail.com
  Subject: Re: Error with pg_dump (of data), with --role
  In-Reply-To: <2996155.1613709876@sss.pgh.pa.us>
  References: <CAD3a31XywdXfeLeSH0NTptRR4iQyiC7CsO_kkMBF6qTNhGC5zw@mail.gmail.com> <296ae0e1-8f2c-fc11-d184-f98dba3d0cd5@gmail.com> <CAD3a31Xgm7_BQdmmA_KZ7KfcRBOeriHNvf215Ru5UQa1BtBQZA@mail.gmail.com> <2996155.1613709876@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