Thread: select from different database
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
You can use the 'dblink' contrib module for that purpose...
-------------
Shoaib Mir
EnterpriseDB (www.enterprisedb.com)
-------------
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
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
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