Re: What are the advantages of not being able to access multiple databases with one connection? - Mailing list pgsql-hackers

From Hannu Krosing
Subject Re: What are the advantages of not being able to access multiple databases with one connection?
Date
Msg-id 508FD141.4000201@2ndQuadrant.com
Whole thread Raw
In response to What are the advantages of not being able to access multiple databases with one connection?  (crocket <crockabiscuit@gmail.com>)
List pgsql-hackers
On 10/30/2012 01:37 PM, crocket wrote:
> MySQL permits a connection to access multiple databases.
> But Postgresql restricts a connection to one database.
> I think postgresql database connection is somewhat limited.
>
> Is it an old and decrepit design? or does it deserve some appreciations?
It's an old and decrepit design ;)

But nobody has found the ability to use many databases from
the same connection valuable enough to do the rewrite needed.

If you have ideas on how to enable access to multiple databases
from the same connection - both at technical and logical level (i.e.
what it would _mean_ and how it would be expressed in SQL) then
sure people would be ready to gear you out.

It would be valuable at least for some tools doing monitoring and
maintenance even in case SQL access to multiple databases
simultaneously would not be available.

For example it would be nice to get pg_stat_user_tables() info for
all databases in a single query or at least to switch databases (say using
SET DATABASE <dbname>) without reconnecting.


Hannu



pgsql-hackers by date:

Previous
From: Will Crawford
Date:
Subject: Re: What are the advantages of not being able to access multiple databases with one connection?
Next
From: Andres Freund
Date:
Subject: Re: [PATCH 3/8] Add support for a generic wal reading facility dubbed XLogReader