So I'm new to using dblink
, I just created a script that inserts data into a table from another database. I received the error function dblink(unknown,unknown) does not exist
.
So I checked online, and used CREATE EXTENSION dblink
, ended up getting this message extension "dblink" already exists
.
My dblink code is like this:
INSERT INTO tableA
SELECT tbl.colA,tbl.colB,...
FROM dblink('dbname=anotherDB', 'SELECT colA,colB,...
FROM tableB')
as tbl(colA,colB,...)
Check out in which schema the extension is installed. In my case this schema is
ext
:Add the schema name to the search path, e.g.:
or use the qualified name of the function
dblink()
, e.g.: