How to Use (Install) Dblink in Postgresql

Installing DBLink for Postgres 9

Install DbLink
DbLink is located in share/contribs/dblink.sql of your PostgreSQL install.To use it, load the dblink.sql file in the database you would like to use it in.

Source: http://www.postgresonline.com/journal/archives/44-Using-DbLink-to-access-other-PostgreSQL-Databases-and-Servers.html

Using dblink extension from pg-promise

It looks like exactly what I get if dblink is installed in "public" but "public" is not in my search_path.

Postgres: Using dblink to make remote connection

Yes only superuser can provide you to the facility to connect through DBLINK

just run this command below whether you are able to connect to database

SELECT dblink_connect('myconn', 'dbname=postgres');
SELECT dblink_connect('myconn', 'hostaddr=remote_addr port=9000 dbname=production user=user password=passwd');

just give the name of database u want to connect after dbname

You can connect

dblink_connect_u

dblink_connect_u() is identical to dblink_connect(), except that it
will allow non-superusers to connect using any authentication method.

Link on postgres site is
dblink

For Superuser ask them to create extension

CREATE EXTENSION dblink;

for your database or schema .

dblink.sql is not present after postgresql-contrib install

It should be bundled as an extension in 9.1

http://www.postgresql.org/docs/current/static/contrib.html

Postgresql 9.2 DBLINK windows 7

I managed to solve the problem by creating a folder dblink under the contrib folder and then I have copied the 3 files (dblink.control, dblink--1.0 and dblink--unpackaged--1.0) form share\extensions to the new folder share\contrib\dblink and after i run the CREATE EXTENSION dblink in each database that i need.



Related Topics



Leave a reply



Submit