Accessing different databases in a cluster

From: Dave Blasby <dblasby(at)refractions(dot)net>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: Accessing different databases in a cluster
Date: 2001-08-01 17:55:11
Message-ID: 3B68427F.83A6BAAC@refractions.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Is it possible to access tables in one database from another database if
they're in the same cluster? I dont seem to be able to do it; is there
something I have to do or is it impossible?

Ie.
If I have two databases accessible from the same postmaster; one called
db_one and the other called db_two.

%psql -U postgres -p 5555 db_one
db_one=# select * from db_two.mytable;
...

or, from the other perspective;

%psql -U postgres -p 5555 db_two
db_two=# select * from db_one.myothertable;
...

Thanks,
dave

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dave Blasby 2001-08-01 17:58:40 How to find the database name during run-time
Previous Message Jan Wieck 2001-08-01 17:48:22 Re: Problem with FK referential actions