Thread: Access Two Databases
Hi, Is it possible using pl/pgSQL functions to grab data from another database or even another database on a different host. Thanks.
Not that i am aware of On Tue, 23 Jul 2002, Dean Grubb wrote: > Hi, > > Is it possible using pl/pgSQL functions to grab data from another database > or even another database on a different host. > > Thanks. > > ---------------------------(end of broadcast)--------------------------- > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org > -- Darren Ferguson
On Tue, 23 Jul 2002, Dean Grubb wrote: > Is it possible using pl/pgSQL functions to grab data from another database > or even another database on a different host. This is where your external-to-PostgreSQL language comes in handy. Open a second connection to the database, do whatever you are going to do and mash the results together outside of PostgreSQL. If for some reason you think the data is related then perhaps you've erred by having more than one database. Joshua b. Jore ; http://www.greentechnologist.org
Darren Ferguson wrote: > Not that i am aware of > > On Tue, 23 Jul 2002, Dean Grubb wrote: >>Hi, >> >>Is it possible using pl/pgSQL functions to grab data from another database >>or even another database on a different host. You can with contrib/dblink. In 7.2, it is a bit (well, maybe more than a bit) awkward, but it works. I hope to have some substantial improvements in usability for the upcoming 7.3 release making use of the new table functions feature. Joe
On Tuesday 23 July 2002 02:59, Joe Conway wrote: > Darren Ferguson wrote: > > Not that i am aware of > > > > On Tue, 23 Jul 2002, Dean Grubb wrote: > >>Hi, > >> > >>Is it possible using pl/pgSQL functions to grab data from another > >> database or even another database on a different host. > > You can with contrib/dblink. > Hi Joe ! Remember me ? Before about 3 months I send to You pl/pgSql wrapper functions for libpq. We agreed then, that merging it with dblink would be a good idea. Meanwhile i used dblink and those functions and wrote some kind of replication for my app. Is there interest for such interface, or should I forget the whole thing ? regards
Darko Prenosil wrote: > Before about 3 months I send to You pl/pgSql wrapper functions for libpq. > We agreed then, that merging it with dblink would be a good idea. > Meanwhile i used dblink and those functions and wrote some kind of > replication for my app. > Is there interest for such interface, or should I forget the whole thing ? I still think it might be a good idea -- I just haven't had time to work on dblink recently. I have a few things on my personal TODO list ahead of it yet. Joe