Re: Patch for Improved Syntax Error Reporting

Поиск
Список
Период
Сортировка
От Neil Padgett
Тема Re: Patch for Improved Syntax Error Reporting
Дата
Msg-id 3B6884E5.5CA1CDE4@redhat.com
обсуждение исходный текст
Ответ на Re: Patch for Improved Syntax Error Reporting  (Bruce Momjian <pgman@candle.pha.pa.us>)
Ответы Re: Patch for Improved Syntax Error Reporting
Список pgsql-patches
Tom Lane wrote:
>
> Fernando Nasser <fnasser@cygnus.com> writes:
> > If instead of printing:
> > ERROR: A parse error near "foo"
> > we print
> > ERROR: A parse error near "foo" (index=10)
> > it should not affect any of the existing clients.
>
> One objection to this idea is that it doesn't play nicely with
> localization of error message texts.  I'd sooner do
>
>         ERROR: A parse error near "foo"
>         ERRORLOCATION: 10
>
> which doesn't create any problems with localization (there's no
> particular need to translate the keywords, since a client probably
> wouldn't show them to the user anyway).  It's just as backward
> compatible, and not that much uglier for an old client.

I'm not sure how this format causes a problem with localization. The
trailing bracketed text isn't part of the message text -- it's just a
set of fields and values. So, since the keywords aren't really intended
for raw display, they don't require translation. Parsing the format is
no harder, and the raw output isn't as ugly as is a multi-line list of
fields and values, IMHO. (I really dislike unnecessarily having gobs of
output lines in the message.)

Neil

--
Neil Padgett
Red Hat Canada Ltd.                       E-Mail:  npadgett@redhat.com
2323 Yonge Street, Suite #300,
Toronto, ON  M4P 2C9

В списке pgsql-patches по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Patch for Improved Syntax Error Reporting
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Patch for Improved Syntax Error Reporting