From: LR <lr-NOSPAM-@sib.org>
To: pgsql-sql@postgresql.org
Subject: Re: execute a query in an other db
Date: Sat, 16 Nov 2002 11:43:09 +0100
Message-ID: <3dd6207d_1@news.bluewin.ch> (raw)
References: <20021112141843.GA27903@wolff.to>
> > 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: lr-NOSPAM-@sib.org
Subject: Re: execute a query in an other db
In-Reply-To: <3dd6207d_1@news.bluewin.ch>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox