Authentication Issue Using PostgreSQL dblink -
how create dblink connection in postgres without supplying username & password (for security reasons)?
running following query returns error:
select dblink_connect('conn_1','dbname=adatabase'); "could not establish connection 08001"
my pgpass.conf file has following entry , i'm running script postgres user in pgadmin:
localhost:5432:*:postgres:apassword
using dblink_connect_u returns same error.
i'm running postgres 9.2 on windows 2012 server
if you're connecting postgresql database, can modify your pg_hba.conf on server you're connecting (for example) passwordless connections allowed user local machine:
local youruser trust host youruser 127.0.0.1/32 trust host youruser ::1/128 trust
ideally, create postgresql user on server dblink, , grant necessary rights (only select
on specific tables, example).
Comments
Post a Comment