0

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.

1
  • FDWs only support tables (as of Postgres 14) Commented Aug 10, 2022 at 11:09

1 Answer 1

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); 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.