Re: Remote connections?

From: Joe Conway <joseph(dot)conway(at)home(dot)com>
To: mlw <markw(at)mohawksoft(dot)com>
Cc: "Ross J(dot) Reedstrom" <reedstrm(at)rice(dot)edu>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Remote connections?
Date: 2001-12-06 22:03:24
Message-ID: 3C0FEB2C.70000@home.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

mlw wrote:

> I too find the internals of PostgreSQL virtually incomprehensible at the
> internal level. If there were a document somewhere which published how a
> function could return multiple tuples, remote views would be a trivial
> undertaking. It could look like:
>
> select * from remote('select *from table', 'user=postgres host=outland
> db=remote');
>

See contrib/dblink in the 7.2 beta. It was my attempt inspired by
Oracle's dblink and some code that you (mlw) posted a while back. Based
on the limitations wrt returning muliple tuples, I wound up with
something like:

lt_lcat=# select dblink_tok(t1.dblink_p,0) as f1 from (select
dblink('hostaddr=127.0.0.1 dbname=template1 user=postgres
password=postgres','select proname from pg_proc') as dblink_p) as t1;

Which, as has been pointed out more than once, is pretty ugly, but at
least it's a start ;-)

Joe

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kelby Zorgdrager 2001-12-06 22:32:45 Help Building PostgreSQL on Solaris
Previous Message mlw 2001-12-06 20:21:13 Re: Remote connections?