Re: Execute a function through fdw

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Patrick FICHE <Patrick(dot)Fiche(at)aqsacom(dot)com>
Cc: "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Execute a function through fdw
Date: 2019-10-18 11:13:31
Message-ID: CAECtzeUbE=4_Y1Am75j6+em75LxFE69t=Zazp5_bpjGjcoV+ig@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Le ven. 18 oct. 2019 à 11:51, Patrick FICHE <Patrick(dot)Fiche(at)aqsacom(dot)com> a
écrit :

> Hello,
>
>
>
> Is it possible to execute a function located on a server accessed through
> Postgres fdw.
>
> This function returns a TABLE structure.
>
>
>
> I have mapped rmt_schema and there is a function called Get_Tables in this
> schema.
>
> I would like to execute something like :
>
> SELECT * FROM rmt_schema.Get_Tables();
>
>
>
> Or is it required to create a local function that will access to remote
> tables in order to achieve the same result ?
>

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

>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Luca Ferrari 2019-10-18 11:24:12 Re: stable for each row before insert trigger
Previous Message Sonam Sharma 2019-10-18 10:08:34 Create role like role