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

2010-10-18 Thread David Fetter
On Mon, Oct 18, 2010 at 07:26:32AM -0700, David Fetter wrote: > On Mon, Oct 18, 2010 at 10:18:25AM -0400, Robert Haas wrote: > > On Mon, Oct 18, 2010 at 10:05 AM, David Fetter wrote: > > > On Mon, Oct 18, 2010 at 10:03:55AM -0400, Robert Haas wrote: > > >> On Sun, Oct 17, 2010 at 2:03 AM, Dmitriy

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

2010-10-18 Thread David Fetter
On Mon, Oct 18, 2010 at 10:18:25AM -0400, Robert Haas wrote: > On Mon, Oct 18, 2010 at 10:05 AM, David Fetter 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 > >> wrote: > >> > I've asked pgsql-general. > >> > Unfortu

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

2010-10-18 Thread Robert Haas
On Mon, Oct 18, 2010 at 10:05 AM, David Fetter 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 wrote: >> > I've asked pgsql-general. >> > Unfortunately it seems that there is no better way to do it except >> > parsing PQer

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

2010-10-18 Thread David Fetter
On Mon, Oct 18, 2010 at 10:03:55AM -0400, Robert Haas wrote: > On Sun, Oct 17, 2010 at 2:03 AM, Dmitriy Igrishin 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 quic

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

2010-10-18 Thread Robert Haas
On Sun, Oct 17, 2010 at 2:03 AM, Dmitriy Igrishin 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 f

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

2010-10-16 Thread Dmitriy Igrishin
Hey Robert, I've asked pgsql-general. Unfortunately it seems that there is no better way to do it except parsing PQerrorMessage(). Sadly. 2010/10/17 Robert Haas > On Thu, Oct 14, 2010 at 2:59 PM, Dmitriy Igrishin > wrote: > > Is there way to determine failed connection attempt due to invalid

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

2010-10-16 Thread Robert Haas
On Thu, Oct 14, 2010 at 2:59 PM, Dmitriy Igrishin wrote: > Is there way to determine failed connection attempt due to invalid > authorization (libpq)? I think this question would be more appropriate on pgsql-general. I suppose you would have to look at PQerrorMessage(). -- Robert Haas Enterpri

[HACKERS] How to determine failed connection attempt due to invalid authorization (libpq)?

2010-10-14 Thread Dmitriy Igrishin
Hey all, Is there way to determine failed connection attempt due to invalid authorization (libpq)? -- // Dmitriy.