Re: [GENERAL] RE: [HACKERS] error messages not only English

Peter T Mount <psqlhack@retep.org.uk>

From: Peter T Mount <psqlhack@retep.org.uk>
To: Bruce Momjian <maillist@candle.pha.pa.us>
Cc: Vadim Mikheev <vadim@krs.ru>, peter@maidstone.gov.uk, sferac@bo.nettuno.it, pgsql-hackers@postgresql.org
Date: 1998-05-26T18:07:35Z
Lists: pgsql-hackers, pgsql-general
On Tue, 26 May 1998, Bruce Momjian wrote:

> > 
> > Peter Mount wrote:
> > > 
> > > That sounds like a good idea.
> > > 
> > > How about having them stored in a new system table (say pg_errormsg) which
> > > contains each possible error in all the supported languages. That way, you
> > > can have multiple language support when users from different countries use
> > > the same server?
> > 
> > Yes, this is nice. One note: server have to load from this table all messages 
> > in a language requested by user when switching to this language - it's not
> > possible to read any table from elog() in most cases.
> 
> Error messages in a system table.  That is cool, and would be very easy
> to add/maintain.  Would have to be loaded into C variables for use,
> however.

Why into C variables? You could have a function that returns the correct
string for the error code, and have it default if it can't access the
table.

-- 
Peter T Mount peter@retep.org.uk or petermount@earthling.net
Main Homepage: http://www.retep.org.uk
************ Someday I may rebuild this signature completely ;-) ************
Work Homepage: http://www.maidstone.gov.uk Work EMail: peter@maidstone.gov.uk