Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lCxek-0000bc-UO for pgsql-general@arkaria.postgresql.org; Fri, 19 Feb 2021 04:44:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lCxej-00043R-Rm for pgsql-general@arkaria.postgresql.org; Fri, 19 Feb 2021 04:44:41 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lCxej-00043G-I6 for pgsql-general@lists.postgresql.org; Fri, 19 Feb 2021 04:44:41 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lCxeh-0006cF-Bd for pgsql-general@lists.postgresql.org; Fri, 19 Feb 2021 04:44:40 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 11J4ia642996156; Thu, 18 Feb 2021 23:44:37 -0500 From: Tom Lane To: Ken Tanzer cc: Rob Sargent , "pgsql-generallists.postgresql.org" Subject: Re: Error with pg_dump (of data), with --role In-reply-to: References: <296ae0e1-8f2c-fc11-d184-f98dba3d0cd5@gmail.com> Comments: In-reply-to Ken Tanzer message dated "Thu, 18 Feb 2021 18:59:44 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2996154.1613709876.1@sss.pgh.pa.us> Date: Thu, 18 Feb 2021 23:44:36 -0500 Message-ID: <2996155.1613709876@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Ken Tanzer 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