BUG #5583: dblink connection error - Mailing list pgsql-bugs

From Piergiorgio Buongiovanni
Subject BUG #5583: dblink connection error
Date
Msg-id 201007301404.o6UE4fYd085803@wwwmaster.postgresql.org
Whole thread Raw
Responses Re: BUG #5583: dblink connection error
List pgsql-bugs
The following bug has been logged online:

Bug reference:      5583
Logged by:          Piergiorgio Buongiovanni
Email address:      piergiorgio.buongiovanni@netspa.it
PostgreSQL version: 8.4.3
Operating system:   x86_64-redhat-linux-gnu
Description:        dblink connection error
Details:

We are trying to use dblink and following instructions on your manual pages
we are trying to execute the following command with user sa on a db named
netdw:

SELECT * FROM dblink(
'dbname=lportal',
'SELECT b.name FROM users_roles a LEFT OUTER JOIN role_ b ON b.roleid =
a.roleid WHERE a.userid = 13902 ORDER BY 1')
AS roles (Role varchar)

The above command works and returns a list of roles as expected. If now we
change the user and execute the following command with user netdw_owner on
the same db named netdw:

SELECT * FROM dblink(
'dbname=lportal user=sa password=xxx',
'SELECT b.name FROM users_roles a LEFT OUTER JOIN role_ b ON b.roleid =
a.roleid WHERE a.userid = 13902 ORDER BY 1')
AS roles (Role varchar)

we obtain the following error:

ERROR:  password is required
DETAIL:  Non-superuser cannot connect if the server does not request a
password.
HINT:  Target server's authentication method must be changed.


********** Errore **********

ERROR: password is required
Stato SQL: 2F003
Dettaglio: Non-superuser cannot connect if the server does not request a
password.
Suggerimento: Target server's authentication method must be changed.

Could you explain how to solve this problem?
Regards.

pgsql-bugs by date:

Previous
From: Dave Page
Date:
Subject: Re: BUG #5581: Fail to start.
Next
From: Joe Conway
Date:
Subject: Re: BUG #5583: dblink connection error