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

Wed, 01 Aug 2001 10:55:11 -0700
Dave Blasby <dblasby@refractions.net>
Accessing different databases in a cluster
On Wed, 1 Aug 2001, Dave Blasby wrote:

> 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?

No, AFAIK, this isn't currently possible.


Wed, 1 Aug 2001 12:22:07 -0700 (PDT)
Stephan Szabo <sszabo@megazone23.bigpanda.com>
Re: Accessing different databases in a cluster
At 12:22 PM 8/1/01 -0700, Stephan Szabo wrote:
>On Wed, 1 Aug 2001, Dave Blasby wrote:
>
> > 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?
>
>No, AFAIK, this isn't currently possible.
Really, you cannot do a "select from" one and "insert into" another?

You could probably rig it up through pipes, like a pg_dump piped to a 
pg_restore.



--
Naomi Walker
Chief Information Officer
Eldorado Computing, Inc.
602-604-3100  ext 242 


Wed, 01 Aug 2001 13:12:14 -0700
Naomi Walker <nwalker@eldocomp.com>
Re: Accessing different databases in a cluster
On Wed, 1 Aug 2001, Naomi Walker wrote:

> At 12:22 PM 8/1/01 -0700, Stephan Szabo wrote:
> >On Wed, 1 Aug 2001, Dave Blasby wrote:
> >
> > > 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?
> >
> >No, AFAIK, this isn't currently possible.
>
> Really, you cannot do a "select from" one and "insert into" another?
> 
> You could probably rig it up through pipes, like a pg_dump piped to a 
> pg_restore.

True, but you can't do it entirely within postgres without writing your
own functions.  You could do some kind of replication, but then you'd
really only be accessing tables inside one database, just ones that were
replicated from another.


Wed, 1 Aug 2001 13:50:57 -0700 (PDT)
Stephan Szabo <sszabo@megazone23.bigpanda.com>
Re: Accessing different databases in a cluster