Re: [GENERAL] RE: [HACKERS] error messages not only English - Mailing list pgsql-hackers

From Peter T Mount
Subject Re: [GENERAL] RE: [HACKERS] error messages not only English
Date
Msg-id Pine.LNX.3.95.980526190532.1473C-100000@retep.org.uk
Whole thread Raw
In response to Re: [GENERAL] RE: [HACKERS] error messages not only English  (Bruce Momjian <maillist@candle.pha.pa.us>)
Responses Re: [GENERAL] RE: [HACKERS] error messages not only English
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: Peter T Mount
Date:
Subject: Re: [GENERAL] RE: [HACKERS] error messages not only English
Next
From: Vadim Mikheev
Date:
Subject: [Fwd: [ANNOUNCE] ipaddr data type - EXTENDED VERSION HERE]