Re: [HACKERS] error messages not only English
От | dg@illustra.com (David Gould) |
---|---|
Тема | Re: [HACKERS] error messages not only English |
Дата | |
Msg-id | 9805261802.AA17530@hawk.illustra.com обсуждение исходный текст |
Ответ на | Re: [HACKERS] error messages not only English (Vadim Mikheev <vadim@krs.ru>) |
Ответы |
Re: [HACKERS] error messages not only English
|
Список | pgsql-hackers |
Vadim writes: > Andreas Zeugswetter wrote: > > > > Anyway, we are still missing the first step in this direction: enumerate ERROR messages. > > BTW, are error codes in standard ? Some are. There is also a format for standard severity levels etc. On the internationalized message topic, how about storing all the messages in a text file. This file would be opened (but not read) at startup by each backend (and the postmaster). To change languages, just open a different file. ELOG would scan the message file to get the message text corresponding to an errog code. Since reading a pre-opened text file does not depend on much of the system working, it should work even in the catastrophic cases. To keep performance good for frequently issued messages, the backend could keep an in memory LRU cache of a few dozen messages and only search the file when the message was not in the cache. This cache could be a simple sequentially searched array as error messages are not a real performance influence except in extremely pathological cases. -dg David Gould dg@illustra.com 510.628.3783 or 510.305.9468 Informix Software (No, really) 300 Lakeside Drive Oakland, CA 94612 "Of course, someone who knows more about this will correct me if I'm wrong, and someone who knows less will correct me if I'm right." --David Palmer (palmer@tybalt.caltech.edu)
В списке pgsql-hackers по дате отправления: