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

Поиск
Список
Период
Сортировка
От Peter T Mount
Тема Re: [GENERAL] RE: [HACKERS] error messages not only English
Дата
Msg-id Pine.LNX.3.95.980526185849.1473B-100000@retep.org.uk
обсуждение исходный текст
Ответ на Re: [GENERAL] RE: [HACKERS] error messages not only English  (Vadim Mikheev <vadim@krs.ru>)
Ответы Re: [GENERAL] RE: [HACKERS] error messages not only English  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Wed, 27 May 1998, Vadim Mikheev wrote:

> The Hermit Hacker wrote:
> >
> > On Tue, 26 May 1998, Vadim Mikheev wrote:
> > >
> > > 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.
> >
> >         Hrmmm...one thing to note with any of this is that by 'hardcoding'
> > in the errormsg itself, it makes it difficult to 'internationalize' a
> > program...in that I can't run a single server on my machine that can
> > easily deal with a 'French' customer vs an 'English' one, vs a 'Japanese'
> > one...I'd have to recompile for each.

This could be got round by using error numbers (which is now on the TODO
list). Error messages that include data (like table names) could include
them using fprintf style %d or %s parameters.

> >         Vadim's other point, about putting this in the front end vs the
> > backend, I think, is more appropriate, that way it is application specific
> > vs server...
>
> I didn't mean to put them in the front-end - this is another good idea :).
> Yes, we could let fe-libpq to read message corresponding to received
> error code in appropriate file on client side.

In libpq, this could be added to PQerrorMessage(). This could attempt to
get the native language error message from the DB, defaulting to either an
english one, or just the error code (it would be a bad problem in this
case).

--
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 по дате отправления:

Предыдущее
От: dg@illustra.com (David Gould)
Дата:
Сообщение: Re: [HACKERS] error messages not only English
Следующее
От: Peter T Mount
Дата:
Сообщение: Re: [GENERAL] RE: [HACKERS] error messages not only English