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