Installing DBLink for Postgres 9

Matty Bear picture Matty Bear · Feb 22, 2011 · Viewed 34.7k times · Source

Can someone please shed some light on how to install the requirements for Postgres 9 (Centos) to be able to use dblink for inter-postgres db querying.

There seems to be no clean documentation out there on how to install dblink requirements in general.

Thanks in advance.

Answer

Mike T picture Mike T · Jun 29, 2012

If you have PostgreSQL 9.1 (or later), make sure the contrib package is installed, e.g., from your shell:

yum install postgres*contrib

Then within the database, use the DDL to create the extension:

CREATE EXTENSION dblink;