I imported a foreign schema using IMPORT FOREIGN SCHEMA. Now I'm able to access all the table content in that schema, but still unable to access any of the functions.
Is it possible to execute a foreign function on the foreign server? With FDW or any other way.
-
FDWs only support tables (as of Postgres 14)user1822– user18222022年08月10日 11:09:41 +00:00Commented Aug 10, 2022 at 11:09
1 Answer 1
You can use dblink to accomplish this. Fortunately, dblink will accept the name of a foreign server in place of the connection string. Unfortunately, it does still remain a bit ugly as the return types must be specified in the query (among other ugliness):
select * from dblink('foreign_server_name', 'select foobar(42)') f(i int);