On Fri, Oct 18, 2019 at 7:55 AM Tom Lane <t...@sss.pgh.pa.us> wrote: > Guillaume Lelarge <guilla...@lelarge.info> writes: > > Le ven. 18 oct. 2019 à 11:51, Patrick FICHE <patrick.fi...@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