Assignment scheme for implementation-defined error codes?

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Assignment scheme for implementation-defined error codes?
Дата
Msg-id Pine.LNX.4.56.0307281112390.2256@krusty.credativ.de
обсуждение исходный текст
Ответы Re: Assignment scheme for implementation-defined error codes?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
I'm currently fixing up ecpg for the new error codes.  (ecpg was doing
string comparisons to detect certain failure conditions, which no longer
works, so this is a must-fix.)  Many of the failure conditions that ecpg
detects explicitly can be mapped to SQLSTATE codes that are defined in the
standard or have been assigned for use by the backend.  Some codes,
however, will end up being specific to ecpg.  I'm wondering what kind of
scheme we should use to allow clients to reserve some SQLSTATE codes for
their own use.

The errors I'm currently looking at can be thought of as "internal
errors", so should I be using the class XX, or maybe XY as internal error
on the client side, or maybe YE as internal error on the client side in
ecpg (so YL could be libpq, YO the ODBC driver, etc.)?

What about creating client-specific subclasses of existing classes?

Is the DB2 SQLSTATE reference, where some codes were apparently taken
from, available somewhere?  (A web search doesn't show anything useful.)

-- 
Peter Eisentraut   peter_e@gmx.net


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Warning for undefined cursor
Следующее
От: The Hermit Hacker
Дата:
Сообщение: Re: developer.postgresql.org is broken