Re: BUG #5246: Misleading/inconsistent SQLSTATE behavior - Mailing list pgsql-bugs

From Kevin Grittner
Subject Re: BUG #5246: Misleading/inconsistent SQLSTATE behavior
Date
Msg-id 4B28F01B020000250002D62C@gw.wicourts.gov
Whole thread Raw
In response to BUG #5246: Misleading/inconsistent SQLSTATE behavior  ("Chris Travers" <chris.travers@gmail.com>)
Responses Re: BUG #5246: Misleading/inconsistent SQLSTATE behavior  (Chris Travers <chris@metatrontech.com>)
List pgsql-bugs
"Chris Travers" <chris.travers@gmail.com> wrote:

> I am noticing that that a failed database connection results in an
> unusable SQLSTATE in libpq, and a very different SQLSTATE than the
> backend registers.

Well, if the client fails to connect to the server, I'm not sure how
the server could communicate its SQLSTATE to the client, in order to
force them to match.

> For example, if a connection fails due to a database not found,
> ... the front-end registers 25P01.

I would have expected something in the 08 class, like maybe 08001 or
08004.

> login fails,  ... the front-end registers 25P01 again.

That definitely sounds like it should use 08001.

-Kevin

pgsql-bugs by date:

Previous
From: Philip Graham
Date:
Subject: Re: BUG #5244: Attempting to rollback to a savepoint after receiving an error with state 55000 the process hangs
Next
From: Chris Travers
Date:
Subject: Re: BUG #5246: Misleading/inconsistent SQLSTATE behavior