I am trying to create a dblink extension on my local machine.
I am using PSQL 9.2.4. I've ran make and make install to install postgres. Went into the contrib folder and ran make and make install in the dblink directory.
dblink is listed in pg_available_extensions table.
However, when I run CREATE EXTENSION dblink; on a database I get the following error:
ERROR: could not load library "/usr/local/pgsql/lib/dblink.so": dlopen(/usr/local/pgsql/lib/dblink.so, 10): Symbol not found: _MemoryContextSwitchTo
Referenced from: /usr/local/pgsql/lib/dblink.so
Expected in: /usr/local/pgsql/bin/postgres
in /usr/local/pgsql/lib/dblink.so
I'm not sure how to fix this. I'm quite new to this. Thanks.
SOLUTION
So I had two versions of postgres on my machine and they were conflicting. I removed one of the version but simplying deleting the directory. All is well