I was able to successfully install postgresql-contrib onto one of my servers and shortly after I had executed dblink.sql onto two of my Postgres databases. After installing postgresql-contrib, I found dblink.sql at the following location:
/usr/share/pgsql/contrib/dblink.sql
Now, I’m trying to do the same thing on another server. After installing postgresql-contrib however, I cannot find any instance of db.sql. Both servers are running CentOS 6.2 and PostgreSQL 9.1, although the PostgreSQL installation on the second server is located in another directory:
PGENGINE=/usr/pgsql-9.1/bin
PGPORT=5432
PGDATA=/var/lib/pgsql/9.1/data
PGLOG=/var/lib/pgsql/9.1/pgstartup.log
When I do “locate dblink”, I receive the following:
[root@dev-postgres dblink]# locate dblink
/usr/lib/debug/usr/pgsql-9.1/lib/dblink.so.debug
/usr/pgsql-9.1/share/man/man3/dblink.3
/usr/pgsql-9.1/share/man/man3/dblink_build_sql_delete.3
/usr/pgsql-9.1/share/man/man3/dblink_build_sql_insert.3
/usr/pgsql-9.1/share/man/man3/dblink_build_sql_update.3
/usr/pgsql-9.1/share/man/man3/dblink_cancel_query.3
/usr/pgsql-9.1/share/man/man3/dblink_close.3
/usr/pgsql-9.1/share/man/man3/dblink_connect.3
/usr/pgsql-9.1/share/man/man3/dblink_connect_u.3
/usr/pgsql-9.1/share/man/man3/dblink_disconnect.3
/usr/pgsql-9.1/share/man/man3/dblink_error_message.3
/usr/pgsql-9.1/share/man/man3/dblink_exec.3
/usr/pgsql-9.1/share/man/man3/dblink_fetch.3
/usr/pgsql-9.1/share/man/man3/dblink_get_connections.3
/usr/pgsql-9.1/share/man/man3/dblink_get_notify.3
/usr/pgsql-9.1/share/man/man3/dblink_get_pkey.3
/usr/pgsql-9.1/share/man/man3/dblink_get_result.3
/usr/pgsql-9.1/share/man/man3/dblink_is_busy.3
/usr/pgsql-9.1/share/man/man3/dblink_open.3
/usr/pgsql-9.1/share/man/man3/dblink_send_query.3
/usr/src/debug/postgresql-9.1.4/contrib/dblink
/usr/src/debug/postgresql-9.1.4/contrib/dblink/dblink.c
…with no dblink.sql. Does anyone know what I can do here? Do I have to somehow build the sql file? If so, do you know how I might do that?
Thanks!
It should be bundled as an extension in 9.1
http://www.postgresql.org/docs/current/static/contrib.html