Re: DBLink issue

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: mpanagop(at)in(dot)gr
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: DBLink issue
Date: 2004-11-08 04:18:32
Message-ID: 20041108041832.GB29445@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Fri, Nov 05, 2004 at 12:05:19PM +0200, mpanagop(at)in(dot)gr wrote:

> I would like to use dblink (postgres 7.3.5) to synchronize the data between two databases.
> I installed dblink and run the command "/usr/local/pgsql/bin/psql -U postgres template1 < dblink.sql"
> and everything seemed to work fine.

You've installed dblink in the template1 database. Databases created
from now on should get dblink, but databases that already exist won't
have it unless you install it in them as well.

> When I tried to use the command "select *from dblink(hostaddr=127.0.0.1 dbname=DB1 user=postgres', select username from users) as t1(username varchar);", I get the following message:
> ERROR: Function dblink("unknown", "unknown") does not exist
> Unable to identify a function that satisfies the given argument types
> You may need to add explicit typecasts

The SELECT statement you posted has syntax errors, so I suspect you
didn't post the exact statement you used. In any case, you appear
to be using a database that doesn't have dblink installed. If you
need dblink in databases that already exist then you'll have to
install it in each one.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Michael Fuhr 2004-11-08 04:24:00 Re: PHP - Tutorial
Previous Message Tom Lane 2004-11-08 04:12:48 Re: FW: Pgsql install