Re: BUG #5246: Misleading/inconsistent SQLSTATE behavior

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #5246: Misleading/inconsistent SQLSTATE behavior
Дата
Msg-id 21468.1261019226@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #5246: Misleading/inconsistent SQLSTATE behavior  (Chris Travers <chris@metatrontech.com>)
Ответы Re: BUG #5246: Misleading/inconsistent SQLSTATE behavior  (Chris Travers <chris@metatrontech.com>)
Список pgsql-bugs
Chris Travers <chris@metatrontech.com> writes:
> It looks like this could be added without a disruption to programmer
> interfaces, but it seems like any major change in this area would
> create binary compatibility issues (i.e. require recompile of linked
> software).  Is this correct in what you mean by API  incompatibility?

No, I'm concerned about the programmer interface at the moment.  What
have you got in mind?

> ... The problem I was running into is that if the
> user enters a non-existant database, the program would prompt for
> username/password instead of letting them know the database was wrong.
> My workaround at the moment is to check the error message against a
> configurable value to see if it represents a missing database.  It
> sucks because it means that foreign locale users must go through extra
> configuration steps.  If I had the SQLSTATE data it would  be easy to
> set up so that wouldn't be needed.

We do have a workaround for distinguishing "password required" from
other errors without any locale-specific tests.  It is surely a crock,
but you'd want to use that in the near term anyway.  Any real fix here
could not appear before 8.5 at the earliest.

            regards, tom lane

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Chris Travers
Дата:
Сообщение: Re: BUG #5246: Misleading/inconsistent SQLSTATE behavior
Следующее
От: Chris Travers
Дата:
Сообщение: Re: BUG #5246: Misleading/inconsistent SQLSTATE behavior