Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ERROR: function dblink(unknown, unknown) does not exist

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.

like image 494
HuFlungPu Avatar asked Jun 19 '18 20:06

HuFlungPu


1 Answers

You need to install an extension dblink

create extension dblink;
like image 193
Roman Marusyk Avatar answered Sep 21 '22 10:09

Roman Marusyk