Hi,

Is it possible using pl/pgSQL functions to grab data from another database
or even another database on a different host.

Thanks.

Tue, 23 Jul 2002 11:41:00 +1000 (Tasmania Standard Time)
"Dean Grubb" <dean@atrium-online.com.au>
Access Two Databases
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


Mon, 22 Jul 2002 22:04:54 -0400 (EDT)
Darren Ferguson <darren@crystalballinc.com>
Re: Access Two Databases
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


Mon, 22 Jul 2002 22:31:14 -0500 (CDT)
Josh Jore <josh@greentechnologist.org>
Re: Access Two Databases
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


Mon, 22 Jul 2002 20:59:24 -0700
Joe Conway <mail@joeconway.com>
Re: Access Two Databases
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 

Tue, 23 Jul 2002 15:44:42 -0100
Darko Prenosil <darko.prenosil@finteh.hr>
Re: Access Two Databases
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


Tue, 23 Jul 2002 16:28:45 -0700
Joe Conway <mail@joeconway.com>
Re: Access Two Databases
On Tuesday 23 July 2002 22:28, Joe Conway wrote:
> 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
>
OK! Let me know when you are ready !

Regards .

>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster


Wed, 24 Jul 2002 09:43:27 -0100
Darko Prenosil <darko.prenosil@finteh.hr>
Re: [GENERAL] Access Two Databases