Re: execute a query in an other db

From: "LR" <lr-NOSPAM-(at)sib(dot)org>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: execute a query in an other db
Date: 2002-11-16 10:43:09
Message-ID: 3dd6207d_1@news.bluewin.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

> > Hi,
> >
> > When I'm connected to a postgreSQL db ( e.g. myDB ), how could I execute
> > "select * from myTable;" in an other db (e.g. myOtherDB).
> >
> > In other words, what is the postgreSQL equivalent of the MS SQL Server
> > statement "USE myOtherDB SELECT * FROM myTable" ?
>
> Stock postgresql doesn't support cross database queries.
> There is a contrib package which does.
>
> In the example you gave, you were combining information from two
databases.
> If it is the case that your application will be combining data from the
> two databases, then you can open a separate connection to each database
> and use the appropiate connection for your queries.

Thank you for your answer.
Do you know the name of this package ?
Thx
Lilian

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Albrecht Berger 2002-11-16 10:51:28 Chaning locale sorting order for statements
Previous Message Peter T. Brown 2002-11-15 20:33:29 how can I improve the speed of this query