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 1qt45A-00Ag1T-GR for pgsql-general@arkaria.postgresql.org; Wed, 18 Oct 2023 10:47:20 +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 1qt3qd-002SDQ-EC for pgsql-general@arkaria.postgresql.org; Wed, 18 Oct 2023 10:32:20 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qt1qm-001LzF-0d for pgsql-general@lists.postgresql.org; Wed, 18 Oct 2023 08:24:20 +0000 Received: from mail.mojserwer.eu ([195.110.48.8]) by magus.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qt1qi-001KV0-2N for pgsql-general@lists.postgresql.org; Wed, 18 Oct 2023 08:24:19 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.mojserwer.eu (Postfix) with ESMTP id 6EA9FAC6F79 for ; Wed, 18 Oct 2023 10:24:14 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail.mojserwer.eu Received: from mail.mojserwer.eu ([127.0.0.1]) by localhost (mail.mojserwer.eu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id c2IwD6S_mByN for ; Wed, 18 Oct 2023 10:24:10 +0200 (CEST) Received: from localhost (91-227-196-3.net4me.pl [91.227.196.3]) by mail.mojserwer.eu (Postfix) with ESMTPSA id 8630EF86D18 for ; Wed, 18 Oct 2023 10:24:09 +0200 (CEST) User-agent: mu4e 1.1.0; emacs 30.0.50 From: Marcin Borkowski To: pgsql-general@lists.postgresql.org Subject: A few questions about foreign tables Date: Wed, 18 Oct 2023 10:24:04 +0200 Message-ID: <87bkcws5i3.fsf@mbork.pl> MIME-Version: 1.0 Content-Type: text/plain List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello, I want to set up a few foreign tables (to access tables from one PostgreSQL database in another one). However, I want to do it "properly", using a database migration tool, so I need to have a "down" migration to revert to the previous state. How to revert the effect of "import foreign schema"? Is just dropping the imported tables enough? Also, how can I check the definitions (i.e., what tables on the server they correspond to) of existing foreign tables? (May I ask to be cc'd since I'm not subscribed to the list?) TIA, -- Marcin Borkowski http://mbork.pl