Mulvaney
Mulvaney

Reputation: 41

Postgresql 9.2 DBLINK windows 7

I have installed the PostgreSQL9.2 and I need to use DBLink after searching through the internet, it is stated that the dblinke should be found under PostgreSQL\9.2\share\contrib. In my case the contrib folder is empty. How can I install the DBlink in Windows?

Upvotes: 1

Views: 5410

Answers (2)

Sandipan
Sandipan

Reputation: 1

select ST.Table_Name, ST.Column_Name, DV.Table_Name, DV.Column_Name, * from information_schema.Columns ST full outer join dblink('dbname=otherdatabase','select Table_Name, Column_Name from information_schema.Columns') DV(Table_Name text, Column_Name text) on ST.Table_Name = DV.Table_name and ST.Column_Name = DV.Column_Name where ST.Column_Name is null or DV.Column_Name is NULL

Upvotes: -1

Mulvaney
Mulvaney

Reputation: 41

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.

Upvotes: 2

Related Questions