Re: [HACKERS] error messages not only English

From: dg(at)illustra(dot)com (David Gould)
To: vadim(at)krs(dot)ru (Vadim Mikheev)
Cc: andreas(dot)zeugswetter(at)telecom(dot)at, hackers(at)postgreSQL(dot)org, mimo(at)interdata(dot)com(dot)pl
Subject: Re: [HACKERS] error messages not only English
Date: 1998-05-26 18:02:13
Message-ID: 9805261802.AA17530@hawk.illustra.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)illustra(dot)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(at)tybalt(dot)caltech(dot)edu)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter T Mount 1998-05-26 18:05:05 Re: [GENERAL] RE: [HACKERS] error messages not only English
Previous Message Peter T Mount 1998-05-26 17:56:39 Re: [HACKERS] Connect string again