I have defined a foreign server pointing to another database. I then want to execute a function in that database and get back the results.
When I try this:
SELECT * FROM dblink('mylink','select someschema.somefunction(''test'', ''ABC'')')
or this:
SELECT t.n FROM dblink('mylink', 'select * from someschema.mytable') as t(n text)
I get the error:
ERROR: function dblink(unknown, unknown) does not exist
Running as superuser.
You need to install an extension dblink
create extension dblink;