pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adrian Klaver <adrian.klaver@aklaver.com>
To: Igor Korot <ikorot01@gmail.com>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: Peter J. Holzer <hjp-pgsql@hjp.at>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Attaching database
Date: Sat, 15 Oct 2022 08:51:41 -0700
Message-ID: <5fbcdf5a-aad8-d927-b547-263db23fca2e@aklaver.com> (raw)
In-Reply-To: <14bb730a-0bef-e7e7-2672-fff31422557b@aklaver.com>
References: <CA+FnnTz339n4z2WuQfP-WtjMXbf65DYs8mdhWtee7w8-42Ldcw@mail.gmail.com>
	<CAFj8pRCktpj00jQwbPS118jrXs4xwxk=TtMpRMSTf61xE+SR1g@mail.gmail.com>
	<CA+FnnTx-xCQ1=tiU_U734UyAeNhM_AHyWk9ZX9a3DGWhDfKesA@mail.gmail.com>
	<CAFj8pRB5Dq3ozKwAS_6rhTg-666L0qN74iXcQ3BnNOSU0jzU8w@mail.gmail.com>
	<20201025182653.GA11390@hjp.at>
	<CA+FnnTyidGOq4+ctHmBz5nPQddo3xJ0RsHoyEvEGPxEKLLcLnw@mail.gmail.com>
	<CAKFQuwZwLYD1LmBjNUXDDHMyb_4YD+sqQpBzfUu=gsVoqrrPcA@mail.gmail.com>
	<CA+FnnTwpYGt1D0bEVw6n2nRJZrzHfySOtGy4ugoTU1BnG_isjQ@mail.gmail.com>
	<14bb730a-0bef-e7e7-2672-fff31422557b@aklaver.com>

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






view thread (17+ messages)  latest in thread

Message-ID: <5fbcdf5a-aad8-d927-b547-263db23fca2e@aklaver.com>
Permalink:  ../5fbcdf5a-aad8-d927-b547-263db23fca2e@aklaver.com/
Also on:    postgresql.org/message-id/5fbcdf5a-aad8-d927-b547-263db23fca2e@aklaver.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: adrian.klaver@aklaver.com, ikorot01@gmail.com, david.g.johnston@gmail.com, hjp-pgsql@hjp.at
  Subject: Re: Attaching database
  In-Reply-To: <5fbcdf5a-aad8-d927-b547-263db23fca2e@aklaver.com>
  References: <CA+FnnTz339n4z2WuQfP-WtjMXbf65DYs8mdhWtee7w8-42Ldcw@mail.gmail.com> <CAFj8pRCktpj00jQwbPS118jrXs4xwxk=TtMpRMSTf61xE+SR1g@mail.gmail.com> <CA+FnnTx-xCQ1=tiU_U734UyAeNhM_AHyWk9ZX9a3DGWhDfKesA@mail.gmail.com> <CAFj8pRB5Dq3ozKwAS_6rhTg-666L0qN74iXcQ3BnNOSU0jzU8w@mail.gmail.com> <20201025182653.GA11390@hjp.at> <CA+FnnTyidGOq4+ctHmBz5nPQddo3xJ0RsHoyEvEGPxEKLLcLnw@mail.gmail.com> <CAKFQuwZwLYD1LmBjNUXDDHMyb_4YD+sqQpBzfUu=gsVoqrrPcA@mail.gmail.com> <CA+FnnTwpYGt1D0bEVw6n2nRJZrzHfySOtGy4ugoTU1BnG_isjQ@mail.gmail.com> <14bb730a-0bef-e7e7-2672-fff31422557b@aklaver.com> <5fbcdf5a-aad8-d927-b547-263db23fca2e@aklaver.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox