0

I am using postgres 9.2 and when executing function dblink facing a fatal error while trying to execute dblink_connect as follows:

SELECT * FROM dblink_connect('host=127.0.0.1 port=5432 dbname=postgres password=test')

ERROR: could not establish connection DETAIL: FATAL: password authentication failed for user "NETWORK SERVICE"

What this error is related to? Do I need to modify pg_hba.conf file by any chance?

  • Perhaps you could tell us what operating system you're using, and what type of authentication you've configured? – voretaq7 Feb 6 '13 at 17:06
0

You need to specify the user parameter in the connect string, for example:

SELECT dblink_connect('host=127.0.0.1 port=5432 dbname=postgres user=postgres password=test')

otherwise it's taken from the user account's name and obviously it's not suitable in your case.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.