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
How to Get the Difference in Years from Two Different Dates
Parse Comma-Separated String to Make in List of Strings in the Where Clause
Pass Multiple Values in Single Parameter
Using Stored Procedure in Classical Asp .. Execute and Get Results
Entity Framework VS Linq to SQL VS Ado.Net With Stored Procedures
How to Find Duplicate Values in a Table in Oracle
Reset Auto Increment Counter in Postgres
How to Get Column Names from a Table in Oracle
SQL Joins VS SQL Subqueries (Performance)
Generate SQL Create Scripts For Existing Tables With Query
How to Declare Variable and Use It in the Same Oracle SQL Script
SQL Server 2005 How Create a Unique Constraint
SQL Server - in Clause With a Declared Variable
Generate_Series() Equivalent in MySQL