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 1ojjS1-0003OI-9V for pgsql-general@arkaria.postgresql.org; Sat, 15 Oct 2022 15:51:49 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ojjRz-0008CA-G5 for pgsql-general@arkaria.postgresql.org; Sat, 15 Oct 2022 15:51:47 +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 1ojjRz-0008C0-5i for pgsql-general@lists.postgresql.org; Sat, 15 Oct 2022 15:51:47 +0000 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ojjRx-0004VP-0L for pgsql-general@lists.postgresql.org; Sat, 15 Oct 2022 15:51:46 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 21E9B32001FC; Sat, 15 Oct 2022 11:51:43 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Sat, 15 Oct 2022 11:51:43 -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=1665849102; x= 1665935502; bh=3aia0paRd0DUHQKOD06FRXBpL616FCY9ULQ8wix9q2o=; b=N DD/cV5Y4hRsFMYf7aWoCC2XVaz1u7PxFE9sCrCUo5oh4PtVDeBD2rb3GbnrMdhtI uV0QDxduvyTBoV8V6VuUU5jmhP86qgNChaI7qgBK1NslIs0AEk2Y06+dOPudvxeQ 7bMpVAmA7wd/h7dNviGlwLMcWx4hvxXnLbHyQo4b8DJTx88yBZOE7m0koup9DiZu BXpzI1vww57djsz1TXw3m/F8XKBMQG8opUS0UeRw+UJXk6zEAWv7xlDEVXMQA2Gb Q8O+cxUdu4AZUHZxPAY4SdLw1ZnTccpJywA6eRse3igzhMsHW8KiacXv9nX6xp9c EZ/KaHRm5AiUK5SRZhHQw== 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=1665849102; x= 1665935502; bh=3aia0paRd0DUHQKOD06FRXBpL616FCY9ULQ8wix9q2o=; b=I PyfhCH7Lf9VaKxnYp6ZBJTfBtabxWMHGNZ2JYCcRCn6mL0kO0XCSqtWZOPShXGeH IVQH1iBtN4QohbfIltcJVzmKpK226l27cKV7BeMLn3DAvVWTPzlqkgsBdp5Jm86b ruwMqw+VnI72erL4P4ns4v4SIpJRSEJGONTtAWLuiN2YDWkLwp8wLI4heNTV1WNG iht+vwoSLPGrHdry+nsR3+5WbvJW/fMYzRWMqcD96GSfH4k3hFGaFAKZA8KqhtUV jeYZm/2LVbcPaIbPj4UAnuVmbFkV24mQ9sKcyhvI8mLfK4yjQLK5xNFgC990m/IC 4GDxzJaw9ckX4cB839oVg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfeekgedgleegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffhvfevfhgjtgfgsehtkeertddtfeejnecuhfhrohhmpeetughr ihgrnhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtg homheqnecuggftrfgrthhtvghrnhepgfeigeethfejtefhgfeiueeuhfejteetleeggfej ueevtefgueekveelhfettdeunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 15 Oct 2022 11:51:41 -0400 (EDT) Message-ID: <5fbcdf5a-aad8-d927-b547-263db23fca2e@aklaver.com> Date: Sat, 15 Oct 2022 08:51:41 -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 Content-Language: en-US From: Adrian Klaver To: Igor Korot , "David G. Johnston" Cc: "Peter J. Holzer" , pgsql-general@lists.postgresql.org References: <20201025182653.GA11390@hjp.at> <14bb730a-0bef-e7e7-2672-fff31422557b@aklaver.com> In-Reply-To: <14bb730a-0bef-e7e7-2672-fff31422557b@aklaver.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 10/15/22 08:20, Adrian Klaver wrote: > 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 ^ in > 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