Thread: dbLink Query

dbLink Query

From
Richard C
Date:
Hi
 
When I execute the query:
 
SELECT *
FROM dblink('dbname=Bas','SELECT id FROM person') AS t(a int)
WHERE t.id > 9000 AND T.ID < 9050;
 
I receive the error message
 
ERROR:  function dblink("unknown", "unknown") does not exist
 
How do I install or setup the function dbLink so that I can use this feature.
 
Regards
Richard


To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre.

Re: dbLink Query

From
Markus Schaber
Date:
Hi, Richard,

Richard C wrote:

> How do I install or setup the function dbLink so that I can use this
> feature.

In your PostgreSQL installation, there should be a contrib directory,
that contains a file dblink.sql - execute it via psql against your
database, and it installs the function definitions.

On my debian machine, it is under:
/usr/share/postgresql/7.4/contrib/dblink.sql
/usr/share/postgresql/8.1/contrib/dblink.sql

HTH,
Markus


-- 
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org