Re: select result / functions from another database in plpgsql

Поиск
Список
Период
Сортировка
От Merlin Moncure
Тема Re: select result / functions from another database in plpgsql
Дата
Msg-id b42b73150611060631w3fdbc5cer641034aba5aab89f@mail.gmail.com
обсуждение исходный текст
Ответ на select result / functions from another database in plpgsql  (Matthew Peter <survivedsushi@yahoo.com>)
Ответы Re: select result / functions from another database in plpgsql  (Richard Broersma Jr <rabroersma@yahoo.com>)
Список pgsql-general
On 11/6/06, Matthew Peter <survivedsushi@yahoo.com> wrote:
> I have DB1 and DB2 pg_databases... I then have a function in DB2 that wants
> some results from DB1, is it possible to query another db? Like how \! lets
> you hit the command line... but I need it in plpgsql if possible.
>
>
> Also, I know functions are local to db (unless it inserted into template1
> prior to createdb) but is there any other way to call functions from another
> db? Thanks!

check out dblink contrib module for starters.   Maybe take a look at
pl/sh, which looks pretty neat.

merlin

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

Предыдущее
От: Roman Neuhauser
Дата:
Сообщение: Re: Dump all databases to corresponding files
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: DISTINCT is not quite distinct