Re: Upgrading the backend's error-message infrastructure
От | Tom Lane |
---|---|
Тема | Re: Upgrading the backend's error-message infrastructure |
Дата | |
Msg-id | 14866.1047613650@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Upgrading the backend's error-message infrastructure ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>) |
Список | pgsql-hackers |
"Christopher Kings-Lynne" <chriskl@familyhealth.com.au> writes: > Would it be possible to do a command line app? > > bash$ pg_error 1200D > Severity: ERROR > Message: Division by zero > Detail: > Hint: Modify statement to prevent zeros appearing in denominators. You're assuming that there's a one-to-one mapping of error codes to messages, which is not likely to be the case --- for example, all the "can't happen" errors will probably get lumped together under a single "internal error" error code. You could provide a lookup of the spec-defined meaning of each error code, maybe. >> Is there any benefit to having this over just including an index of >> error codes in the documentation? > It's quick and easy, especially when there's thousands of error codes. But there aren't. I count about 130 SQLSTATEs defined by the spec. Undoubtedly we'll make more for Postgres-specific errors, but not hundreds more. There's just not value to applications in distinguishing errors at such a fine grain. regards, tom lane
В списке pgsql-hackers по дате отправления: