From: | Oni <drentha(at)gmail(dot)com> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | installing dblink |
Date: | 2010-05-19 01:43:00 |
Message-ID: | f642fc4f-d81f-48a0-ae6f-30a210e42f4c@11g2000prv.googlegroups.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Tried to do a "use database" within postgres.
Read the doco which said to use dblink. However this produced the
following error: "No function matches the given name and argument
types. You might need to add explicit type casts."
So installed
apt-get install postgresql-contrib-8.3
But it still didnt work. Read some more:
find /usr/share/postgresql -name dblink.sql (/usr/share/postgresql/
8.3/contrib/dblink.sql)
cd /usr/share/postgresql/8.3/contrib
psql -d database -f dblink.sql
psql database
SELECT * FROM dblink('dbname=database', 'select name, title from
pages') AS t1(name text, title text);
And hey presto it works... and it only took 3 hours.
From | Date | Subject | |
---|---|---|---|
Next Message | Jasen Betts | 2010-05-19 11:01:55 | Re: Copy function - how to move text types across |
Previous Message | Leif Biberg Kristensen | 2010-05-18 18:50:53 | Re: psql \e and syntax highlighting in vim |