Re: Remote connections?
От | Joe Conway |
---|---|
Тема | Re: Remote connections? |
Дата | |
Msg-id | 3C0FEB2C.70000@home.com обсуждение исходный текст |
Ответ на | Remote connections? (mlw <markw@mohawksoft.com>) |
Список | 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
В списке pgsql-hackers по дате отправления: