Thread: select from different database

select from different database

From
Robert Rak
Date:
Hi all :)

Is it possible to fetch data from another database than the current?

I have stored procedure in DB_1 and I would like do INSERT to table in
DB_2. Is it possible?
If yes, ho to do it?

Thanks
Robert

Re: select from different database

From
"Shoaib Mir"
Date:
You can use the 'dblink' contrib module for that purpose...

-------------
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)

On 1/8/07, Robert Rak <robertrak81@tlen.pl> wrote:
Hi all :)

Is it possible to fetch data from another database than the current?

I have stored procedure in DB_1 and I would like do INSERT to table in
DB_2. Is it possible?
If yes, ho to do it?

Thanks
Robert

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq

Re: select from different database

From
"Guido Barosio"
Date:
Wouldn't be better to create a new schema on your current database?

g.-

On 1/8/07, Robert Rak <robertrak81@tlen.pl> wrote:
> Hi all :)
>
> Is it possible to fetch data from another database than the current?
>
> I have stored procedure in DB_1 and I would like do INSERT to table in
> DB_2. Is it possible?
> If yes, ho to do it?
>
> Thanks
> Robert
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
>                http://www.postgresql.org/docs/faq
>


--
Guido Barosio
-----------------------
http://www.globant.com
guido.barosio@globant.com

Re: select from different database

From
Robert Rak
Date:
In my opinion no because these two datebase exists and i have to fetch
data from another database than the current.

Robert

Guido Barosio napisał(a):
> Wouldn't be better to create a new schema on your current database?
>
> g.-
>
> On 1/8/07, Robert Rak <robertrak81@tlen.pl> wrote:
>> Hi all :)
>>
>> Is it possible to fetch data from another database than the current?
>>
>> I have stored procedure in DB_1 and I would like do INSERT to table in
>> DB_2. Is it possible?
>> If yes, ho to do it?
>>
>> Thanks
>> Robert