Calling a table residing in another database from Plpgsql

Поиск
Список
Период
Сортировка
От deepthi@granwill.com
Тема Calling a table residing in another database from Plpgsql
Дата
Msg-id 43146.61.11.66.222.1104902026.squirrel@61.11.66.222
обсуждение исходный текст
Ответы Re: Calling a table residing in another database from Plpgsql  (Kenneth Gonsalves <lawgon@thenilgiris.com>)
Re: Calling a table residing in another database from Plpgsql  (Joe Conway <mail@joeconway.com>)
Re: Calling a table residing in another database from Plpgsql  (Kretschmer Andreas <andreas_kretschmer@despammed.com>)
Re: Calling a table residing in another database from Plpgsql  (CoL <col@mportal.hu>)
Список pgsql-sql
Hi,

I have function called test1() in database 1. I need to input the value
from this function into another table which is in database2.

How can i achieve this task in plpgsql. I went through some documentation
and found out that it is possible through dblink.

I infact downloaded the dblink package in contrib folder. But still when i
tried to use dblink in the following manner:

SELECT * from dblink('host=192.168.0.50 dbname=AK1 user=akteam','Select
userid from user_reg') as t (userid integer);

I am getting an error as "ERROR:  function dblink("unknown", "unknown")
does not exist"

Is dblink the only way of connecting the databases and if so what is the
exact step by step procedure to be follwed to download dblink and use it
to connect databases.

Thanks in advance,
Regards,
deepthi








В списке pgsql-sql по дате отправления:

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: foreign key problems
Следующее
От: deepthi@granwill.com
Дата:
Сообщение: Calling a table in another database from plpgsql