Re: Attaching database

2022-10-18 Thread Julien Rouhaud
Hi, On Tue, Oct 18, 2022 at 10:06:40PM -0500, Igor Korot wrote: > Hi, guys, > After reading the documentation on > https://www.postgresql.org/docs/current/postgres-fdw.html > and checking the example I have a different question. > > The presentation in the link referenced doesn't explain how to ge

Re: Attaching database

2022-10-18 Thread Igor Korot
Hi, guys, After reading the documentation on https://www.postgresql.org/docs/current/postgres-fdw.html and checking the example I have a different question. The presentation in the link referenced doesn't explain how to get the table list on the remote server and the information on the specific ta

Re: Attaching database

2022-10-15 Thread Alex Theodossis
Hi, you can only run inquires now on information_schema for the database you are connected to. If you are looking/searching in pg_database though, you can information globally. Something changed recently (I am using Dbeaver); I was able to attach to a single database and see all my databas

Re: Attaching database

2022-10-15 Thread Adrian Klaver
On 10/15/22 08:56, Igor Korot wrote: Hi, Adrian, So any and all operations/queries performed before, during or after that will be done on (finance) catalog), because this is the "main" connection, right? I think you are getting stuck on SQLite terminology: https://sqlite.org/lang_attac

Re: Attaching database

2022-10-15 Thread Igor Korot
Hi, Adrian, On Sat, Oct 15, 2022, 10:51 AM Adrian Klaver wrote: > 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)

Re: Attaching database

2022-10-15 Thread Adrian Klaver
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 cu

Re: Attaching database

2022-10-15 Thread Adrian Klaver
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

Re: Attaching database

2022-10-14 Thread Julien Rouhaud
Hi, On Fri, Oct 14, 2022 at 11:16:44PM -0500, Igor Korot wrote: > > Sorry for resurrecting this old thread... > If an attaching the DB creates new connection which will be cmpletely > independent - how the INFORMATION_SCHEMA.table@table_catalog > field is handled. > > Lets say I open connection to

Re: Attaching database

2022-10-14 Thread David G. Johnston
On Fri, Oct 14, 2022 at 9:47 PM 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

Re: Attaching database

2022-10-14 Thread Igor Korot
Hi, David et al, On Fri, Oct 14, 2022 at 11:39 PM David G. Johnston wrote: > > On Fri, Oct 14, 2022 at 9:17 PM Igor Korot wrote: >> >> Hi, guys, >> >> On Sun, Oct 25, 2020 at 1:27 PM Peter J. Holzer wrote: >> > >> > On 2020-10-19 20:21:05 +0200, Pavel Stehule wrote: >> >> > In case this isn't c

Re: Attaching database

2022-10-14 Thread David G. Johnston
On Fri, Oct 14, 2022 at 9:17 PM Igor Korot wrote: > Hi, guys, > > On Sun, Oct 25, 2020 at 1:27 PM Peter J. Holzer wrote: > > > > On 2020-10-19 20:21:05 +0200, Pavel Stehule wrote: > > > In case this isn't clear: > > > > It is the server (or more specifically, the foreign data wrapper) which > >

Re: Attaching database

2022-10-14 Thread Igor Korot
Hi, guys, On Sun, Oct 25, 2020 at 1:27 PM Peter J. Holzer wrote: > > On 2020-10-19 20:21:05 +0200, Pavel Stehule wrote: > > po 19. 10. 2020 v 20:18 odesílatel Igor Korot napsal: > > On Mon, Oct 19, 2020 at 12:51 PM Pavel Stehule > > wrote: > > > It is a different thing - postgresql_

Re: Attaching database

2020-10-25 Thread Peter J. Holzer
On 2020-10-19 20:21:05 +0200, Pavel Stehule wrote: > po 19. 10. 2020 v 20:18 odesílatel Igor Korot napsal: > On Mon, Oct 19, 2020 at 12:51 PM Pavel Stehule > wrote: > > It is a different thing - postgresql_fdw does nested connect - it uses > > client-server protocol. > > >

Re: Attaching database

2020-10-19 Thread Pavel Stehule
po 19. 10. 2020 v 20:18 odesílatel Igor Korot napsal: > Hi, Pavel, > > On Mon, Oct 19, 2020 at 12:51 PM Pavel Stehule > wrote: > > > > Hi > > > > po 19. 10. 2020 v 19:40 odesílatel Igor Korot > napsal: > >> > >> Hi, > >> IIUC, PostgreSQL does not support attaching a database to an existing > >>

Re: Attaching database

2020-10-19 Thread Igor Korot
Hi, Pavel, On Mon, Oct 19, 2020 at 12:51 PM Pavel Stehule wrote: > > Hi > > po 19. 10. 2020 v 19:40 odesílatel Igor Korot napsal: >> >> Hi, >> IIUC, PostgreSQL does not support attaching a database to an existing >> connection. >> However I was told that I can use this: >> https://www.postgresql

Re: Attaching database

2020-10-19 Thread Pavel Stehule
Hi po 19. 10. 2020 v 19:40 odesílatel Igor Korot napsal: > Hi, > IIUC, PostgreSQL does not support attaching a database to an existing > connection. > However I was told that I can use this: > https://www.postgresql.org/docs/9.3/postgres-fdw.html. > > Is it the same thing? Why there is no simple

Attaching database

2020-10-19 Thread Igor Korot
Hi, IIUC, PostgreSQL does not support attaching a database to an existing connection. However I was told that I can use this: https://www.postgresql.org/docs/9.3/postgres-fdw.html. Is it the same thing? Why there is no simple ATTACH AS ? Thank you.