Accessing another db?

Поиск
Список
Период
Сортировка
Искать

Accessing another db?

От:
"Graeme Merrall" <gbmerrall@aol.com>
Дата:
After browsing through the archives and coming up nix I was wondering if
it's possoble for a user to query the tables in another database. Coming
from an Oracle background  it's possible to use "SELECT column1 FROM
user.table" but I can't seem to find if this is possible in postgres

I've read some discussion from April 2002 which infers that that
functionality doesn't exist but it's coming in 7.3. Correct?

Permissions aren't too much of a problem because this is in a private
system.

Cheers,
 Graeme

Re: Accessing another db?

От:
Martijn van Oosterhout <kleptog@svana.org>
Дата:
On Tue, Jun 18, 2002 at 03:57:20PM +1000, Graeme Merrall wrote:
> After browsing through the archives and coming up nix I was wondering if
> it's possoble for a user to query the tables in another database. Coming
> from an Oracle background  it's possible to use "SELECT column1 FROM
> user.table" but I can't seem to find if this is possible in postgres
> 
> I've read some discussion from April 2002 which infers that that
> functionality doesn't exist but it's coming in 7.3. Correct?

Postgres doesn't support queries from other databases and probably never
will. What you're referring to is schemas. i.e. grouping tables into schemas
and controlling access to each. This feature is under development and will
probably appear in 7.3.

-- 
Martijn van Oosterhout      http://svana.org/kleptog/
> There are 10 kinds of people in the world, those that can do binary
> arithmetic and those that can't.

Re: Accessing another db?

От:
Thomas Beutin <tyrone@laokoon.IN-Berlin.DE>
Дата:
On Tue, Jun 18, 2002 at 03:57:20PM +1000, Graeme Merrall wrote:
> After browsing through the archives and coming up nix I was wondering if
> it's possoble for a user to query the tables in another database. Coming
> from an Oracle background  it's possible to use "SELECT column1 FROM
> user.table" but I can't seem to find if this is possible in postgres
AFAIK every database has its own tables - and cannot see other databases
tables.

In pgsql You can change to another database with the command
\connect 


> I've read some discussion from April 2002 which infers that that
> functionality doesn't exist but it's coming in 7.3. Correct?
I don't know, sorry.

greetz
-tb
-- 
Thomas Beutin                             tb@laokoon.IN-Berlin.DE
Beam me up, Scotty. There is no intelligent live down in Redmond.

Re: Accessing another db?

От:
Manuel Cabido <manny@tinago.msuiit.edu.ph>
Дата:

	Try using the dblink commands. We were able to do remote updates 
and queries on three different databases on 3 remote locations. It works 
within our intranet connection.

Manny


FAQ