Re: Execute a function through fdw

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема Re: Execute a function through fdw
Дата
Msg-id CAMkU=1yHQvyPO0q9UugxBzWJR0ZppbVQ_jn8fM9N1ZYpBHkpFg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Execute a function through fdw  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general


On Fri, Oct 18, 2019 at 7:55 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Guillaume Lelarge <guillaume@lelarge.info> writes:
> Le ven. 18 oct. 2019 à 11:51, Patrick FICHE <Patrick.Fiche@aqsacom.com> a
> écrit :
>> Is it possible to execute a function located on a server accessed through
>> Postgres fdw.

> It's probably easier to create a view on the remote server, and access it
> as a foreign table on the local server.

Yes, that would probably work here, but if the function takes user-supplied arguments, that won't work. 

Yeah.  Or if you really want to call a remote function by name, see
dblink.  postgres_fdw actively avoids doing that sort of thing.

And importantly, you can specify the name of the existing postgres_fdw server to the dblink functions in place of the connection string.  This removes quite a bit of the drudgery of using dblink, if you are already using postgres_fdw.
 
Cheers,

Jeff

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

Предыдущее
От: Ariadne Conill
Дата:
Сообщение: Re: jsonb_set() strictness considered harmful to data
Следующее
От: Julie Nishimura
Дата:
Сообщение: Re: releasing space