Re: How to determine failed connection attempt due to invalid authorization (libpq)?

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: David Fetter <david(at)fetter(dot)org>
Cc: Dmitriy Igrishin <dmitigr(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: How to determine failed connection attempt due to invalid authorization (libpq)?
Date: 2010-10-18 14:18:25
Message-ID: AANLkTikEGtjK86paVYkbEjXq6x7SB5h=W1c=eTgZWWXn@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Oct 18, 2010 at 10:05 AM, David Fetter <david(at)fetter(dot)org> wrote:
> On Mon, Oct 18, 2010 at 10:03:55AM -0400, Robert Haas wrote:
>> On Sun, Oct 17, 2010 at 2:03 AM, Dmitriy Igrishin <dmitigr(at)gmail(dot)com> wrote:
>> > I've asked pgsql-general.
>> > Unfortunately it seems that there is no better way to do it except
>> > parsing PQerrorMessage(). Sadly.
>>
>> Yeah, doesn't look like it.  A quick glance at the code reveals that a
>> PGresult can store individual error fields but a PGconn can store only
>> a message.   :-(
>
> Does this seem worth patching for 9.1?

Please feel free to submit a patch if you have an idea how to solve it.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Fetter 2010-10-18 14:26:32 Re: How to determine failed connection attempt due to invalid authorization (libpq)?
Previous Message Robert Haas 2010-10-18 14:17:37 Re: ask for review of MERGE