Re: Error with pg_dump (of data), with --role

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ken Tanzer <ken(dot)tanzer(at)gmail(dot)com>
Cc: Rob Sargent <robjsargent(at)gmail(dot)com>, "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Error with pg_dump (of data), with --role
Date: 2021-02-19 04:44:36
Message-ID: 2996155.1613709876@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ken Tanzer <ken(dot)tanzer(at)gmail(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Kevin Brannen 2021-02-19 05:01:10 RE: Syntax checking DO blocks and ALTER TABLE statements?
Previous Message Rob Sargent 2021-02-19 03:16:25 Re: Error with pg_dump (of data), with --role