Re: Facing authentication error on postgres 9.2 -> dblink functions - Mailing list pgsql-hackers

From Dev Kumkar
Subject Re: Facing authentication error on postgres 9.2 -> dblink functions
Date
Msg-id CALSLE1PqzB=_dXpsp4D4LNqv1CVYY27YZ_y+hVC2MfJmD6Qhxw@mail.gmail.com
Whole thread
In response to Re: Facing authentication error on postgres 9.2 -> dblink functions  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
Apologies for posting on multiple lists, surely will take care of this next time.

Yup adding user=username resolved this. Thanks to 'Laurenz Albe' and you too.

Regards - Dev

On Wed, Feb 6, 2013 at 7:12 PM, Andrew Dunstan <andrew@dunslane.net> wrote:

On 02/06/2013 08:09 AM, Dev Kumkar wrote:
Hello Everyone,

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?

Thanks..



Do NOT send questions to multiple lists. That is a waste of everybody's time. So do NOT follow up this email. This question belongs on pgsql-general. If you have further questions pleease ask there.

The short answer is that you need to provide the user name in your connect string.

cheers

andrew


pgsql-hackers by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: [COMMITTERS] pgsql: Fast promote mode skips checkpoint at end of recovery.
Next
From: Andrew Dunstan
Date:
Subject: Re: Alias hstore's ? to ~ so that it works with JDBC