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

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -