Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iNlKe-0008Fi-5F for pgsql-general@arkaria.postgresql.org; Thu, 24 Oct 2019 22:11:48 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iNlKc-0000Sc-Fc for pgsql-general@arkaria.postgresql.org; Thu, 24 Oct 2019 22:11:46 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iNlKc-0000SU-2F for pgsql-general@lists.postgresql.org; Thu, 24 Oct 2019 22:11:46 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1iNlKZ-0004Jz-Q2 for pgsql-general@lists.postgresql.org; Thu, 24 Oct 2019 22:11:44 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x9OMBePO012088; Thu, 24 Oct 2019 18:11:40 -0400 From: Tom Lane To: Adrian Klaver cc: stan , pgsql-general@lists.postgresql.org Subject: Re: A very puzzling backup/restore problem In-reply-to: <83c9bcf7-fede-39be-c2ed-bffbd4da5082@aklaver.com> References: <20191024105227.GA13265@panix.com> <4fc52554-6dad-b833-c800-7f91172c7cf1@aklaver.com> <20191024143253.GA16590@panix.com> <42316356-9409-3908-5a13-9f20c1f5b04f@aklaver.com> <20191024215806.GA7146@panix.com> <83c9bcf7-fede-39be-c2ed-bffbd4da5082@aklaver.com> Comments: In-reply-to Adrian Klaver message dated "Thu, 24 Oct 2019 15:02:39 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <12086.1571955100.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Thu, 24 Oct 2019 18:11:40 -0400 Message-ID: <12087.1571955100@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Adrian Klaver writes: > On 10/24/19 2:58 PM, stan wrote: >> So, it appears that this means that the function cannot be found, even = if it is in the new >> (default) schema. > The original error was not about finding the function it was about not = > finding the table in the function: > psql:task_instance.dump:55: ERROR: relation "permitted_work" does not e= xist > LINE 3: permitted_work > ^ > You need to schema qualify the table name inside the function. Or attach a SET clause to the function, so that it executes with a known search_path regardless of the session's prevailing path. regards, tom lane