Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qbZZi-00CQcE-CA for pgsql-general@arkaria.postgresql.org; Thu, 31 Aug 2023 04:46:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qbZZh-003yYv-9O for pgsql-general@arkaria.postgresql.org; Thu, 31 Aug 2023 04:46:33 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qbZZg-003yYh-Tf for pgsql-general@lists.postgresql.org; Thu, 31 Aug 2023 04:46:32 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qbZZd-001uES-Pf for pgsql-general@lists.postgresql.org; Thu, 31 Aug 2023 04:46:31 +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 37V4kS9e305862; Thu, 31 Aug 2023 00:46:28 -0400 From: Tom Lane To: "Pete O'Such" cc: pgsql-general@lists.postgresql.org Subject: Re: PG FDW query fails, works local, same credentials In-reply-to: References: Comments: In-reply-to "Pete O'Such" message dated "Wed, 30 Aug 2023 23:52:35 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <305860.1693457188.1@sss.pgh.pa.us> Date: Thu, 31 Aug 2023 00:46:28 -0400 Message-ID: <305861.1693457188@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "Pete O'Such" writes: > I've got a view on server A (PG 15.2) that fails when queried via FDW from > server B (also PG 15.2). Querying it as a foreign table from server B > yields a message like "ERROR: function blah(type) does not exist". Check your search path assumptions. postgres_fdw runs remote queries with a very minimal search_path setting, so that unqualified references to non-built-in objects are likely to fail. regards, tom lane