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 1ojiyN-0001Tv-JG for pgsql-general@arkaria.postgresql.org; Sat, 15 Oct 2022 15:21:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ojiyK-0002xC-Ui for pgsql-general@arkaria.postgresql.org; Sat, 15 Oct 2022 15:21:08 +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 1ojiyJ-0002x2-Al for pgsql-general@lists.postgresql.org; Sat, 15 Oct 2022 15:21:08 +0000 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ojiyC-0004Hh-T6 for pgsql-general@lists.postgresql.org; Sat, 15 Oct 2022 15:21:06 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 534783200906; Sat, 15 Oct 2022 11:20:58 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Sat, 15 Oct 2022 11:20:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1665847257; x= 1665933657; bh=DJ8SrfDxgO4mCG8QeSmFDlsGtyy9jHqdwjX9rdZEtBE=; b=d Xj83SeePOks1VNvFnUiPH1/HbUaUWW7YjLB1SgI7FN9r/+UTqnGqJaaVaOgB92Vm 4J5dUqNq8UbhsyF7QFFxGnQfb1dVNVGt/yIfgVAO23V5lIFMqGUll4Jcgi5v7QKo dDPui4doVXZComk9kU4W44uMdlzqDwRjApURwsuOEelhqppQAn92azw2pCffWxmX 6VSKaW0X0nwP08dhFBfNdbQIiIxUu1IBlB2DRA2h+5sUX3Yu+YCN8+8LLyxG+gtH y8+8OiATpimsqT5rR7EVfHOeOqFGQxmFeyICTf94MPrZsts6uB9eX3wMDUTNuSuo g+s6Q5eyvxvkLY1OBwsBA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1665847257; x= 1665933657; bh=DJ8SrfDxgO4mCG8QeSmFDlsGtyy9jHqdwjX9rdZEtBE=; b=R H3j+TeTHT+B1p31Qbr+UmAf3f1r2qFNg0ID+td78yXfE321t2Wv91NEgGPL/Njf6 rp1sh6syoei3y6K6mzlxQnmQUHt6buBElrfhqH9Osj05uN/n/dxINRTdKXlwfuqM lC/y5+fqwmfRKcYnJpD1TND/loZzl51l4JRPdjkeHZQm+5vtc7hYzMjR8yQD4GQW G5Y2z0VMgQiK+vSYC5eiM4kdme+qx+enaWMxvesuBHOHWnZ1qgDOksPLgwCy3HGA 09jaZ2nctJ94bd+2Fj+nHOjtkMzVNNs83U43BxuQ4EBTbxXqrdw5kJJErCiGaQhc UstB4N5rEAD06xVS19f4g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfeekgedgkeejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpeetughr ihgrnhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtg homheqnecuggftrfgrthhtvghrnhepjeegtdfhuefhtefgffdvheduleetgeejudevffek teegjeeiheeuudellefgffffnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 15 Oct 2022 11:20:56 -0400 (EDT) Message-ID: <14bb730a-0bef-e7e7-2672-fff31422557b@aklaver.com> Date: Sat, 15 Oct 2022 08:20:55 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.3 Subject: Re: Attaching database To: Igor Korot , "David G. Johnston" Cc: "Peter J. Holzer" , pgsql-general@lists.postgresql.org References: <20201025182653.GA11390@hjp.at> Content-Language: en-US From: Adrian Klaver In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 10/14/22 21:46, Igor Korot wrote: > Making catalog current means switching between DBs. > Remember initially I connected to (finance) DB, which made the (finance) catalog > current. > Then I "opened a second connection" to (finance_2021), which made > that current catalog and so that select would give me all tables from > (finance_2021). No you didn't. Rough outline of what happens: 1) You connected to the database finance. 2) While in the finance database you queried the foreign tables that are linked to finance_2021. 3) The queries made connections the to finance_2021 for the purposes of making the data visible in the foreign tables in finance. 4) The client you did this did not 'leave' the finance database, so the only information_schema you have access to is in the finance database. > > I hope now its clearer. > > Thank you. > >> >> David J. > > -- Adrian Klaver adrian.klaver@aklaver.com